LibWeb: Layout/Shape font-variant-* css properties

This commit is contained in:
Johan Dahlin 2024-12-05 01:21:45 +01:00 committed by Jelle Raaijmakers
commit 083f4f3d08
Notes: github-actions[bot] 2024-12-17 18:08:20 +00:00
8 changed files with 310 additions and 14 deletions

View file

@ -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