mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibGfx: Remove code point parameter from Gfx::Font::Metrics
Everyone was asking for the glyph width of 'M' anyway. We can just make that request implicit and simplify the API.
This commit is contained in:
parent
b0955fd269
commit
2f7b6af87e
5 changed files with 9 additions and 9 deletions
|
@ -166,7 +166,7 @@ bool MediaFeature::compare(HTML::Window const& window, MediaFeatureValue left, C
|
|||
Gfx::IntRect viewport_rect { 0, 0, window.inner_width(), window.inner_height() };
|
||||
|
||||
auto const& initial_font = window.associated_document().style_computer().initial_font();
|
||||
Gfx::FontMetrics const& initial_font_metrics = initial_font.metrics('M');
|
||||
Gfx::FontMetrics const& initial_font_metrics = initial_font.metrics();
|
||||
float initial_font_size = initial_font.presentation_size();
|
||||
|
||||
left_px = left.length().to_px(viewport_rect, initial_font_metrics, initial_font_size, initial_font_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue