mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 18:58:56 +00:00
LibGfx/Font: Use harfbuzz in ScaledFont::glyph_width()
This commit is contained in:
parent
fb539b2412
commit
ae82bf5f7a
Notes:
github-actions[bot]
2024-09-04 11:15:16 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: ae82bf5f7a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1271
1 changed files with 2 additions and 2 deletions
|
@ -40,8 +40,8 @@ float ScaledFont::width(Utf8View const& view) const { return measure_text_width(
|
|||
|
||||
float ScaledFont::glyph_width(u32 code_point) const
|
||||
{
|
||||
auto id = glyph_id_for_code_point(code_point);
|
||||
return m_typeface->glyph_advance(id, m_x_scale, m_y_scale, m_point_width, m_point_height);
|
||||
auto string = String::from_code_point(code_point);
|
||||
return measure_text_width(Utf8View(string), *this);
|
||||
}
|
||||
|
||||
template<typename CodePointIterator>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue