mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibWeb: Don't override computed font-weight with value from used font
The CSS font-weight is king, even if we load a font that has another weight value in its OpenType tables.
This commit is contained in:
parent
429b2e5860
commit
10020ba182
1 changed files with 1 additions and 1 deletions
|
@ -2321,7 +2321,7 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele
|
|||
auto found_font = compute_font_for_style_values(element, pseudo_element, font_family, font_size, font_style, font_weight, font_stretch);
|
||||
|
||||
style.set_property(CSS::PropertyID::FontSize, LengthStyleValue::create(CSS::Length::make_px(found_font->pixel_size())).release_value_but_fixme_should_propagate_errors(), nullptr);
|
||||
style.set_property(CSS::PropertyID::FontWeight, NumberStyleValue::create(found_font->weight()).release_value_but_fixme_should_propagate_errors(), nullptr);
|
||||
style.set_property(CSS::PropertyID::FontWeight, NumberStyleValue::create(font_weight->to_font_weight()).release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
style.set_computed_font(found_font.release_nonnull());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue