mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibGfx: Remove single-code point Font::glyph_or_emoji_width API
All callers are now aware of multi-code point emoji (and must remain so going forward).
This commit is contained in:
parent
16ec116133
commit
34567bc145
Notes:
sideshowbarker
2024-07-16 23:48:04 +09:00
Author: https://github.com/trflynn89
Commit: 34567bc145
Pull-request: https://github.com/SerenityOS/serenity/pull/17568
6 changed files with 11 additions and 21 deletions
|
@ -98,23 +98,20 @@ float ScaledFont::glyph_width(u32 code_point) const
|
|||
return metrics.advance_width;
|
||||
}
|
||||
|
||||
float ScaledFont::glyph_or_emoji_width(u32 code_point) const
|
||||
{
|
||||
auto id = glyph_id_for_code_point(code_point);
|
||||
auto metrics = glyph_metrics(id);
|
||||
return metrics.advance_width;
|
||||
}
|
||||
|
||||
float ScaledFont::glyph_or_emoji_width(Utf8CodePointIterator& it) const
|
||||
{
|
||||
// FIXME: Support multi-code point emoji with scaled fonts.
|
||||
return glyph_or_emoji_width(*it);
|
||||
auto id = glyph_id_for_code_point(*it);
|
||||
auto metrics = glyph_metrics(id);
|
||||
return metrics.advance_width;
|
||||
}
|
||||
|
||||
float ScaledFont::glyph_or_emoji_width(Utf32CodePointIterator& it) const
|
||||
{
|
||||
// FIXME: Support multi-code point emoji with scaled fonts.
|
||||
return glyph_or_emoji_width(*it);
|
||||
auto id = glyph_id_for_code_point(*it);
|
||||
auto metrics = glyph_metrics(id);
|
||||
return metrics.advance_width;
|
||||
}
|
||||
|
||||
float ScaledFont::glyphs_horizontal_kerning(u32 left_code_point, u32 right_code_point) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue