mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
LibWeb: Layout/Shape font-variant-* css properties
This commit is contained in:
parent
1c42d6831b
commit
083f4f3d08
Notes:
github-actions[bot]
2024-12-17 18:08:20 +00:00
Author: https://github.com/jdahlin
Commit: 083f4f3d08
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2197
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/kalenikaliaksandr
Reviewed-by: https://github.com/tcl3
8 changed files with 310 additions and 14 deletions
|
@ -58,13 +58,13 @@ ScaledFontMetrics ScaledFont::metrics() const
|
|||
return metrics;
|
||||
}
|
||||
|
||||
float ScaledFont::width(StringView view) const { return measure_text_width(Utf8View(view), *this); }
|
||||
float ScaledFont::width(Utf8View const& view) const { return measure_text_width(view, *this); }
|
||||
float ScaledFont::width(StringView view) const { return measure_text_width(Utf8View(view), *this, {}); }
|
||||
float ScaledFont::width(Utf8View const& view) const { return measure_text_width(view, *this, {}); }
|
||||
|
||||
float ScaledFont::glyph_width(u32 code_point) const
|
||||
{
|
||||
auto string = String::from_code_point(code_point);
|
||||
return measure_text_width(Utf8View(string), *this);
|
||||
return measure_text_width(Utf8View(string), *this, {});
|
||||
}
|
||||
|
||||
NonnullRefPtr<ScaledFont> ScaledFont::scaled_with_size(float point_size) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue