Lines Matching defs:font

2 // (drawing and font code)
20 // [SECTION] Default font data (ProggyClean.ttf)
284 // Those light colors are better suited with a thicker font than the default one + FrameBorder
1176 void ImDrawList::AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end, float wrap_width, const ImVec4* cpu_fine_clip_rect)
1186 // Pull default font/size from the shared ImDrawListSharedData instance
1187 if (font == NULL)
1188 font = _Data->Font;
1192 IM_ASSERT(font->ContainerAtlas->TexID == _TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font.
1202 font->RenderText(this, font_size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip_rect != NULL);
1465 // When clearing this we lose access to the font name and other information used to build the font.
1523 // Although it is likely to be the most commonly used format, our font rendering is 1 channel / 8 bpp
1550 // Create new font
1554 IM_ASSERT(!Fonts.empty() && "Cannot use MergeMode for the first font"); // When using MergeMode make sure that a font has already been added before. You can use ImGui::GetIO().Fonts->AddFontDefault() to add the default imgui font.
1572 // Default font TTF is compressed with stb_compress then base85 encoded (see misc/fonts/binary_to_compressed_c.cpp for encoder)
1604 ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, glyph_ranges);
1605 font->DisplayOffset.y = 1.0f;
1606 return font;
1622 // Store a short copy of filename into into the font name for convenience
1661 ImFont* font = AddFontFromMemoryCompressedTTF(compressed_ttf, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);
1663 return font;
1679 int ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset)
1681 IM_ASSERT(font != NULL);
1690 r.Font = font;
1748 // Temporary data for one source font (multiple source fonts can be merged into one destination ImFont)
1759 int GlyphsCount; // Glyph count (excluding missing glyphs and glyphs already set by an earlier source font)
1767 int SrcCount; // Number of source fonts targeting this destination font.
1770 ImBoolVector GlyphsSet; // This is used to resolve collision when multiple sources are merged into a same destination font.
1806 // 1. Initialize font loading structure, check font data validity
1822 // Initialize helper structure for font loading and verify that the TTF/OTF data is correct
1837 // 2. For every requested codepoint, check for their presence in the font data, and handle redundancy or overlaps between source fonts to avoid unused glyphs.
1853 if (!stbtt_FindGlyphIndex(&src_tmp.FontInfo, codepoint)) // It is actually in the font?
1945 // 6. Pack each source font. No rendering yet, we are working with rectangles in an infinitely tall texture at this point.
1969 // 8. Render/rasterize font characters into the texture
2004 ImFont* dst_font = cfg.DstFont; // We can have multiple input fonts writing into a same destination font (when using MergeMode=true)
2053 void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent)
2057 font->ClearOutputData();
2058 font->FontSize = font_config->SizePixels;
2059 font->ConfigData = font_config;
2060 font->ContainerAtlas = atlas;
2061 font->Ascent = ascent;
2062 font->Descent = descent;
2064 font->ConfigDataCount++;
2509 IM_ASSERT(IndexLookup.Size > 0); // Currently this can only be called AFTER the font has been built, aka after calling ImFontAtlas::GetTexDataAs*() function.
3055 // FIXME: Rendering an ellipsis "..." is a surprisingly tricky problem for us... we cannot rely on font glyph having it,
3057 // the boldness or positioning of what the font uses...
3060 ImFont* font = draw_list->_Data->Font;
3061 const float font_scale = draw_list->_Data->FontSize / font->FontSize;
3062 pos.y += (float)(int)(font->DisplayOffset.y + font->Ascent * font_scale + 0.5f - 1.0f);
3188 // [SECTION] Default font data (ProggyClean.ttf)