mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibGfx: Support computing a font's glyph width with code point iterators
This allows consideration of multi-code point glyphs.
This commit is contained in:
parent
71967bc5de
commit
a391ea3da3
Notes:
sideshowbarker
2024-07-17 03:05:16 +09:00
Author: https://github.com/trflynn89
Commit: a391ea3da3
Pull-request: https://github.com/SerenityOS/serenity/pull/17558
5 changed files with 46 additions and 22 deletions
|
@ -105,6 +105,18 @@ float ScaledFont::glyph_or_emoji_width(u32 code_point) const
|
|||
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);
|
||||
}
|
||||
|
||||
float ScaledFont::glyph_or_emoji_width(Utf32CodePointIterator& it) const
|
||||
{
|
||||
// FIXME: Support multi-code point emoji with scaled fonts.
|
||||
return glyph_or_emoji_width(*it);
|
||||
}
|
||||
|
||||
float ScaledFont::glyphs_horizontal_kerning(u32 left_code_point, u32 right_code_point) const
|
||||
{
|
||||
if (left_code_point == 0 || right_code_point == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue