mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibGfx: Insert pixel and ttf fonts into Typeface structure
This adds a new structure 'Typeface' to the FontDatabase that represents all fonts of the same family and variant. It can contain a list of BitmapFonts with varying size but of the same family and weight or a pointer to a single TTF font for all sizes of this Typeface.
This commit is contained in:
parent
2c4e13f14a
commit
179dba652e
13 changed files with 248 additions and 32 deletions
|
@ -900,7 +900,7 @@ FLATTEN void Painter::draw_glyph(const IntPoint& point, u32 code_point, Color co
|
|||
|
||||
FLATTEN void Painter::draw_glyph(const IntPoint& point, u32 code_point, const Font& font, Color color)
|
||||
{
|
||||
draw_bitmap(point, font.glyph_bitmap(code_point), color);
|
||||
draw_bitmap(point, font.glyph(code_point).glyph_bitmap(), color);
|
||||
}
|
||||
|
||||
void Painter::draw_emoji(const IntPoint& point, const Gfx::Bitmap& emoji, const Font& font)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue