Lines Matching defs:font_cfg
1544 ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
1547 IM_ASSERT(font_cfg->FontData != NULL && font_cfg->FontDataSize > 0);
1548 IM_ASSERT(font_cfg->SizePixels > 0.0f);
1551 if (!font_cfg->MergeMode)
1556 ConfigData.push_back(*font_cfg);
1564 memcpy(new_font_cfg.FontData, font_cfg->FontData, (size_t)new_font_cfg.FontDataSize);
1591 ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
1594 font_cfg.OversampleH = font_cfg.OversampleV = 1;
1595 font_cfg.PixelSnapH = true;
1597 if (font_cfg.SizePixels <= 0.0f)
1598 font_cfg.SizePixels = 13.0f * 1.0f;
1599 if (font_cfg.Name[0] == '\0')
1600 ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "ProggyClean.ttf, %dpx", (int)font_cfg.SizePixels);
1603 const ImWchar* glyph_ranges = font_cfg.GlyphRanges != NULL ? font_cfg.GlyphRanges : GetGlyphRangesDefault();
1604 ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, glyph_ranges);
1619 ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
1620 if (font_cfg.Name[0] == '\0')
1625 ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "%s, %.0fpx", p, size_pixels);
1627 return AddFontFromMemoryTTF(data, (int)data_size, size_pixels, &font_cfg, glyph_ranges);
1634 ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
1635 IM_ASSERT(font_cfg.FontData == NULL);
1636 font_cfg.FontData = ttf_data;
1637 font_cfg.FontDataSize = ttf_size;
1638 font_cfg.SizePixels = size_pixels;
1640 font_cfg.GlyphRanges = glyph_ranges;
1641 return AddFont(&font_cfg);
1650 ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
1651 IM_ASSERT(font_cfg.FontData == NULL);
1652 font_cfg.FontDataOwnedByAtlas = true;
1653 return AddFontFromMemoryTTF(buf_decompressed_data, (int)buf_decompressed_size, size_pixels, &font_cfg, glyph_ranges);
1656 ImFont* ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(const char* compressed_ttf_data_base85, float size_pixels, const ImFontConfig* font_cfg, const ImWchar* glyph_ranges)
1661 ImFont* font = AddFontFromMemoryCompressedTTF(compressed_ttf, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);