Skip to content

Commit 819c114

Browse files
committed
Update README.md
1 parent 7591252 commit 819c114

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ Gallery
3636
![screenshot 4](/web/test_window_04.png?raw=true)
3737
![screenshot 4](/web/examples_02.png?raw=true)
3838

39-
ImGui can load TTF fonts. UTF-8 is supported for text display and input. Here using Arial Unicode font to display Japanese:
39+
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:
40+
41+
```
42+
ImGuiIO& io = ImGui::GetIO();
43+
io.Fonts->AddFontFromFileTTF("ArialUni.ttf", 18.0f, io.Fonts->GetGlyphRangesJapanese());
44+
45+
```
46+
![Japanese screenshot](/web/code_sample_01_jp.png?raw=true)
4047

4148
![utf-8 screenshot](/web/utf8_sample_01.png?raw=true)
4249

0 commit comments

Comments
 (0)