Skip to content

Commit 96a7873

Browse files
committed
Update documentation
1 parent 470200e commit 96a7873

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

extra_fonts/README.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
Load .TTF file with:
1515

1616
ImGuiIO& io = ImGui::GetIO();
17-
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels);
17+
io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels);
1818

1919
Detailed options:
2020

2121
ImFontConfig config;
2222
config.OversampleH = 3;
2323
config.OversampleV = 3;
2424
config.GlyphExtraSpacing.x = 1.0f;
25-
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels, &config);
25+
io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, &config);
2626

2727
Combine two fonts into one:
2828

@@ -34,22 +34,22 @@
3434
ImFontConfig config;
3535
config.MergeMode = true;
3636
io.Fonts->AddFontFromFileTTF("fontawesome-webfont.ttf", 16.0f, &config, ranges);
37-
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels, &config, io.Fonts->GetGlyphRangesJapanese());
37+
io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, &config, io.Fonts->GetGlyphRangesJapanese());
3838

3939
Add a fourth parameter to bake specific font ranges only:
4040

4141
// Basic Latin, Extended Latin
42-
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels, NULL, io.Fonts->GetGlyphRangesDefault());
42+
io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, NULL, io.Fonts->GetGlyphRangesDefault());
4343

4444
// Include full set of about 21000 CJK Unified Ideographs
45-
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels, NULL, io.Fonts->GetGlyphRangesJapanese());
45+
io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, NULL, io.Fonts->GetGlyphRangesJapanese());
4646

4747
// Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs
48-
io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels, NULL, io.Fonts->GetGlyphRangesChinese());
48+
io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, NULL, io.Fonts->GetGlyphRangesChinese());
4949

5050
Offset font vertically by altering the io.Font->DisplayOffset value:
5151

52-
ImFont* font = io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_pixels);
52+
ImFont* font = io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels);
5353
font->DisplayOffset.y += 1; // Render 1 pixel down
5454

5555
---------------------------------

0 commit comments

Comments
 (0)