You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: misc/freetype/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Build font atlases using FreeType instead of stb_truetype (which is the default
5
5
6
6
### Usage
7
7
8
-
1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype`).
8
+
1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype`, `vcpkg integrate install`).
9
9
2. Add imgui_freetype.h/cpp alongside your imgui sources.
10
10
3. Include imgui_freetype.h after imgui.h.
11
11
4. Call `ImGuiFreeType::BuildFontAtlas()`*BEFORE* calling `ImFontAtlas::GetTexDataAsRGBA32()` or `ImFontAtlas::Build()` (so normal Build() won't be called):
for (int codepoint = src_range[0]; codepoint <= src_range[1]; codepoint++)
379
379
{
380
-
if (dst_tmp.GlyphsSet.GetBit(codepoint)) // Don't overwrite existing glyphs. We could make this an option (e.g. MergeOverwrite)
380
+
if (dst_tmp.GlyphsSet.TestBit(codepoint)) // Don't overwrite existing glyphs. We could make this an option (e.g. MergeOverwrite)
381
381
continue;
382
382
uint32_t glyph_index = FT_Get_Char_Index(src_tmp.Font.Face, codepoint); // It is actually in the font? (FIXME-OPT: We are not storing the glyph_index..)
383
383
if (glyph_index == 0)
@@ -386,8 +386,8 @@ bool ImFontAtlasBuildWithFreeType(FT_Library ft_library, ImFontAtlas* atlas, uns
386
386
// Add to avail set/counters
387
387
src_tmp.GlyphsCount++;
388
388
dst_tmp.GlyphsCount++;
389
-
src_tmp.GlyphsSet.SetBit(codepoint, true);
390
-
dst_tmp.GlyphsSet.SetBit(codepoint, true);
389
+
src_tmp.GlyphsSet.SetBit(codepoint);
390
+
dst_tmp.GlyphsSet.SetBit(codepoint);
391
391
total_glyphs_count++;
392
392
}
393
393
}
@@ -398,13 +398,13 @@ bool ImFontAtlasBuildWithFreeType(FT_Library ft_library, ImFontAtlas* atlas, uns
0 commit comments