From 819c114c3477ef31b32b9979b832ab5fcbc51264 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 26 Feb 2015 19:13:32 +0000 Subject: [PATCH 1/3] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae36127b1..8110d25f7 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,14 @@ Gallery ![screenshot 4](/web/test_window_04.png?raw=true) ![screenshot 4](/web/examples_02.png?raw=true) -ImGui can load TTF fonts. UTF-8 is supported for text display and input. Here using Arial Unicode font to display Japanese: +ImGui can load TTF fonts. UTF-8 is supported for text display and input. Here using Arial Unicode font to display Japanese. Initialize custom font with: + +``` + ImGuiIO& io = ImGui::GetIO(); + io.Fonts->AddFontFromFileTTF("ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese()); + +``` +![Japanese screenshot](/web/code_sample_01_jp.png?raw=true) ![utf-8 screenshot](/web/utf8_sample_01.png?raw=true) From 1d7b0084cbaa3928b1e426a219711f0c25ad6676 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 26 Feb 2015 19:14:37 +0000 Subject: [PATCH 2/3] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8110d25f7..c050474dd 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,12 @@ Gallery ImGui can load TTF fonts. UTF-8 is supported for text display and input. Here using Arial Unicode font to display Japanese. Initialize custom font with: ``` - ImGuiIO& io = ImGui::GetIO(); - io.Fonts->AddFontFromFileTTF("ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese()); +ImGuiIO& io = ImGui::GetIO(); +io.Fonts->AddFontFromFileTTF("ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese()); ``` ![Japanese screenshot](/web/code_sample_01_jp.png?raw=true) -![utf-8 screenshot](/web/utf8_sample_01.png?raw=true) - References ---------- From 0ece471a713bdc9cd74d45cc65113635a74a5ad9 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 26 Feb 2015 19:15:04 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c050474dd..1ee939139 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,6 @@ ImGui can load TTF fonts. UTF-8 is supported for text display and input. Here us ``` ImGuiIO& io = ImGui::GetIO(); io.Fonts->AddFontFromFileTTF("ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese()); - ``` ![Japanese screenshot](/web/code_sample_01_jp.png?raw=true)