Lines Matching defs:font
44 - How can I load a different font than the default?
186 // TODO: Load TTF/OTF fonts if you don't want to use the default font.
222 // TODO: Load TTF/OTF fonts if you don't want to use the default font.
409 - you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwise CreateContext() will create its own font atlas instance.
411 - removed the default global context and font atlas instance, which were confusing for users of DLL reloading and users of multiple contexts.
528 - 2015/01/11 (1.30) - big font/image API change! now loads TTF file. allow for multiple fonts. no need for a PNG loader.
530 font init: { const void* png_data; unsigned int png_size; ImGui::GetDefaultFontData(NULL, NULL, &png_data, &png_size); <..Upload texture to GPU..>; }
533 it is now recommended that you sample the font texture with bilinear interpolation.
774 Q: How can I load a different font than the default?
775 A: Use the font atlas to load the TTF/OTF file you want:
781 (Read the 'misc/fonts/README.txt' file for more details about font loading.)
790 A: The most convenient and practical way is to merge an icon font such as FontAwesome inside you
791 main font. Then you can refer to icons within your strings.
793 (Read the 'misc/fonts/README.txt' file for more details about icons font loading.)
796 A: Use the font atlas to pack them into a single texture:
804 // the first loaded font gets used by default
805 // use ImGui::PushFont()/ImGui::PopFont() to change the font at runtime
820 io.Fonts->AddFontFromFileTTF("fontawesome-webfont.ttf", 16.0f, &config, ranges); // Merge icon font
824 A: When loading a font, pass custom Unicode ranges to specify the glyphs to load.
3416 // Setup current font and draw list shared data
3842 // Unlock font atlas
3908 ImFont* font = g.Font;
3912 ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL);
4452 // For color, style and font stacks there is an incentive to use Push/Begin/Pop/.../End patterns, so we relax our checks a little to allow them.
5670 void ImGui::SetCurrentFont(ImFont* font)
5673 IM_ASSERT(font && font->IsLoaded()); // Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ?
5674 IM_ASSERT(font->Scale > 0.0f);
5675 g.Font = font;
5685 void ImGui::PushFont(ImFont* font)
5688 if (!font)
5689 font = GetDefaultFont();
5690 SetCurrentFont(font);
5691 g.FontStack.push_back(font);
5692 g.CurrentWindow->DrawList->PushTextureID(font->ContainerAtlas->TexID);