Lines Matching defs:font

2 // (drawing and font code)
21 // [SECTION] Default font data (ProggyClean.ttf)
310 // Those light colors are better suited with a thicker font than the default one + FrameBorder
1571 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)
1581 // Pull default font/size from the shared ImDrawListSharedData instance
1582 if (font == NULL)
1583 font = _Data->Font;
1587 IM_ASSERT(font->ContainerAtlas->TexID == _CmdHeader.TextureId); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font.
1597 font->RenderText(this, font_size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip_rect != NULL);
1991 // When clearing this we lose access to the font name and other information used to build the font.
2046 // Although it is likely to be the most commonly used format, our font rendering is 1 channel / 8 bpp
2073 // Create new font
2077 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.
2099 // Default font TTF is compressed with stb_compress then base85 encoded (see misc/fonts/binary_to_compressed_c.cpp for encoder)
2133 ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, glyph_ranges);
2134 return font;
2144 IM_ASSERT_USER_ERROR(0, "Could not load font file!");
2150 // Store a short copy of filename into into the font name for convenience
2189 ImFont* font = AddFontFromMemoryCompressedTTF(compressed_ttf, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);
2191 return font;
2205 int ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset)
2210 IM_ASSERT(font != NULL);
2219 r.Font = font;
2257 // Default font is none are specified
2300 // Temporary data for one source font (multiple source fonts can be merged into one destination ImFont)
2311 int GlyphsCount; // Glyph count (excluding missing glyphs and glyphs already set by an earlier source font)
2319 int SrcCount; // Number of source fonts targeting this destination font.
2322 ImBitVector GlyphsSet; // This is used to resolve collision when multiple sources are merged into a same destination font.
2358 // 1. Initialize font loading structure, check font data validity
2375 // Initialize helper structure for font loading and verify that the TTF/OTF data is correct
2390 // 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.
2405 if (!stbtt_FindGlyphIndex(&src_tmp.FontInfo, codepoint)) // It is actually in the font?
2496 // 6. Pack each source font. No rendering yet, we are working with rectangles in an infinitely tall texture at this point.
2520 // 8. Render/rasterize font characters into the texture
2555 // - We can have multiple input fonts writing into a same destination font.
2598 void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent)
2602 font->ClearOutputData();
2603 font->FontSize = font_config->SizePixels;
2604 font->ConfigData = font_config;
2605 font->ConfigDataCount = 0;
2606 font->ContainerAtlas = atlas;
2607 font->Ascent = ascent;
2608 font->Descent = descent;
2610 font->ConfigDataCount++;
3135 static ImWchar FindFirstExistingGlyph(ImFont* font, const ImWchar* candidate_chars, int candidate_chars_count)
3138 if (font->FindGlyphNoFallback(candidate_chars[n]) != NULL)
3187 // FIXME: Note that 0x2026 is rarely included in our font ranges. Because of this we are more likely to use three individual dots.
3245 // 'cfg' is not necessarily == 'this->ConfigData' because multiple source fonts+configs can be used to build one target font.
3292 IM_ASSERT(IndexLookup.Size > 0); // Currently this can only be called AFTER the font has been built, aka after calling ImFontAtlas::GetTexDataAs*() function.
3518 // Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound.
3533 // Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound.
4073 // [SECTION] Default font data (ProggyClean.ttf)