diff --git a/src/font.cpp b/src/font.cpp index 0dbb6c61..9de5e3bb 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -64,16 +64,20 @@ void create_fonts(const overlay_params& params, ImFont*& small_font, ImFont*& te io.Fonts->AddFontFromMemoryCompressedBase85TTF(forkawesome_compressed_data_base85, font_size, &config, icon_ranges); if (params.no_small_font) small_font = io.Fonts->Fonts[0]; - else + else { small_font = io.Fonts->AddFontFromFileTTF(params.font_file.c_str(), font_size * 0.55f, nullptr, default_range); + io.Fonts->AddFontFromMemoryCompressedBase85TTF(forkawesome_compressed_data_base85, font_size * 0.55f, &config, icon_ranges); + } } else { const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85(); io.Fonts->AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_size, nullptr, default_range); io.Fonts->AddFontFromMemoryCompressedBase85TTF(forkawesome_compressed_data_base85, font_size, &config, icon_ranges); if (params.no_small_font) small_font = io.Fonts->Fonts[0]; - else + else { small_font = io.Fonts->AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_size * 0.55f, nullptr, default_range); + io.Fonts->AddFontFromMemoryCompressedBase85TTF(forkawesome_compressed_data_base85, font_size * 0.55f, &config, icon_ranges); + } } auto font_file_text = params.font_file_text; diff --git a/src/forkawesome.h b/src/forkawesome.h index e0727a9f..8dd069c6 100644 --- a/src/forkawesome.h +++ b/src/forkawesome.h @@ -1,5 +1,7 @@ // File: 'forkawesome-webfont.ttf' (218132 bytes) // Exported using binary_to_compressed_c.cpp +#pragma once + static const char forkawesome_compressed_data_base85[214910+1] = "7])#######91@P)'/###[),##0rC$#Q6>##T@;*>[VPlmI$g]=5g>11gZn42d%&XpG,>>#I&g<6aNV=BmXpxb-OJM'^5YY#D2XGH-VSA$NiFJ(LjK8/d_(*Hlme+M:6h]=3YN$5#-0%J" "a+msP.*8>,rM/m&0.d-Q@pV-TT$=(^K-G&WbDE-FqEn/<_[FHv'=gu;?^01=G#cDE-BqEn/DJ[^I&IP+%u3S>-kfWX%34^=BUkAr'X>wu#jx###^bCiF"