mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-24 12:08:22 +00:00
Fix font ranges.
This commit is contained in:
@@ -18,7 +18,7 @@ FontData g_fonts;
|
||||
|
||||
void LoadFonts( float scale )
|
||||
{
|
||||
static const ImWchar rangesBasic[] = {
|
||||
static const ImWchar rangesText[] = {
|
||||
0x0020, 0xFFFF,
|
||||
0,
|
||||
};
|
||||
@@ -26,10 +26,6 @@ void LoadFonts( float scale )
|
||||
ICON_MIN_FA, ICON_MAX_FA,
|
||||
0
|
||||
};
|
||||
static const ImWchar rangesFixed[] = {
|
||||
0x0020, 0xFFFF,
|
||||
0
|
||||
};
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
@@ -54,23 +50,23 @@ void LoadFonts( float scale )
|
||||
|
||||
io.Fonts->Clear();
|
||||
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontNormal->data(), fontNormal->size(), round( 15.0f * scale ), &configBasic, rangesBasic );
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontNormal->data(), fontNormal->size(), round( 15.0f * scale ), &configBasic, rangesText );
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontIcons->data(), fontIcons->size(), round( 14.0f * scale ), &configMerge, rangesIcons );
|
||||
|
||||
g_fonts.mono = io.Fonts->AddFontFromMemoryTTF( (void*)fontFixed->data(), fontFixed->size(), round( 15.0f * scale ), &configFixed, rangesFixed );
|
||||
g_fonts.mono = io.Fonts->AddFontFromMemoryTTF( (void*)fontFixed->data(), fontFixed->size(), round( 15.0f * scale ), &configFixed, rangesText );
|
||||
|
||||
g_fonts.big = io.Fonts->AddFontFromMemoryTTF( (void*)fontNormal->data(), fontNormal->size(), round( 21.0f * scale ), &configBasic, rangesBasic );
|
||||
g_fonts.big = io.Fonts->AddFontFromMemoryTTF( (void*)fontNormal->data(), fontNormal->size(), round( 21.0f * scale ), &configBasic, rangesText );
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontIcons->data(), fontIcons->size(), round( 20.0f * scale ), &configMerge, rangesIcons );
|
||||
|
||||
g_fonts.small = io.Fonts->AddFontFromMemoryTTF( (void*)fontNormal->data(), fontNormal->size(), round( 10.0f * scale ), &configBasic );
|
||||
g_fonts.small = io.Fonts->AddFontFromMemoryTTF( (void*)fontNormal->data(), fontNormal->size(), round( 10.0f * scale ), &configBasic, rangesText );
|
||||
|
||||
g_fonts.bold = io.Fonts->AddFontFromMemoryTTF( (void*)fontBold->data(), fontBold->size(), round( 15.0f * scale ), &configBasic );
|
||||
g_fonts.bold = io.Fonts->AddFontFromMemoryTTF( (void*)fontBold->data(), fontBold->size(), round( 15.0f * scale ), &configBasic, rangesText );
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontIcons->data(), fontIcons->size(), round( 20.0f * scale ), &configMerge, rangesIcons );
|
||||
|
||||
g_fonts.boldItalic = io.Fonts->AddFontFromMemoryTTF( (void*)fontBoldItalic->data(), fontBoldItalic->size(), round( 15.0f * scale ), &configBasic );
|
||||
g_fonts.boldItalic = io.Fonts->AddFontFromMemoryTTF( (void*)fontBoldItalic->data(), fontBoldItalic->size(), round( 15.0f * scale ), &configBasic, rangesText );
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontIcons->data(), fontIcons->size(), round( 20.0f * scale ), &configMerge, rangesIcons );
|
||||
|
||||
g_fonts.italic = io.Fonts->AddFontFromMemoryTTF( (void*)fontItalic->data(), fontItalic->size(), round( 15.0f * scale ), &configBasic );
|
||||
g_fonts.italic = io.Fonts->AddFontFromMemoryTTF( (void*)fontItalic->data(), fontItalic->size(), round( 15.0f * scale ), &configBasic, rangesText );
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)fontIcons->data(), fontIcons->size(), round( 20.0f * scale ), &configMerge, rangesIcons );
|
||||
|
||||
ImGui_ImplOpenGL3_DestroyFontsTexture();
|
||||
|
||||
Reference in New Issue
Block a user