mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibGfx: Make Font::glyph_width*() APIs return float
This commit is contained in:
parent
3407ab0fd1
commit
555d7a6fce
Notes:
sideshowbarker
2024-07-17 11:33:34 +09:00
Author: https://github.com/awesomekling
Commit: 555d7a6fce
7 changed files with 14 additions and 14 deletions
|
@ -57,14 +57,14 @@ Gfx::Glyph ScaledFont::glyph(u32 code_point) const
|
|||
return Gfx::Glyph(bitmap, metrics.left_side_bearing, metrics.advance_width, metrics.ascender);
|
||||
}
|
||||
|
||||
u8 ScaledFont::glyph_width(u32 code_point) const
|
||||
float ScaledFont::glyph_width(u32 code_point) const
|
||||
{
|
||||
auto id = glyph_id_for_code_point(code_point);
|
||||
auto metrics = glyph_metrics(id);
|
||||
return metrics.advance_width;
|
||||
}
|
||||
|
||||
int ScaledFont::glyph_or_emoji_width(u32 code_point) const
|
||||
float ScaledFont::glyph_or_emoji_width(u32 code_point) const
|
||||
{
|
||||
auto id = glyph_id_for_code_point(code_point);
|
||||
auto metrics = glyph_metrics(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue