aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/canvas_data.rs
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2023-08-17 01:23:14 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-10-02 14:37:19 +0000
commit105050d46d019779a356f7a3d204d5b565e4c743 (patch)
tree30d55b6f9903311a605717cd1351d66b2f70be8e /components/canvas/canvas_data.rs
parentdcafbde25651bf67a4fd49b226ac8aa0d0566c40 (diff)
downloadservo-105050d46d019779a356f7a3d204d5b565e4c743.tar.gz
servo-105050d46d019779a356f7a3d204d5b565e4c743.zip
Further changes required by Servo
Diffstat (limited to 'components/canvas/canvas_data.rs')
-rw-r--r--components/canvas/canvas_data.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs
index d75ef2529f0..778851524ba 100644
--- a/components/canvas/canvas_data.rs
+++ b/components/canvas/canvas_data.rs
@@ -1412,15 +1412,15 @@ fn load_system_font_from_style(font_style: Option<&FontStyleStruct>) -> Option<F
.collect::<Vec<_>>();
let properties = properties
.style(match style.font_style {
- font::FontStyle::Normal => Style::Normal,
- font::FontStyle::Italic => Style::Italic,
- font::FontStyle::Oblique(..) => {
+ font::FontStyle::NORMAL => Style::Normal,
+ font::FontStyle::ITALIC => Style::Italic,
+ _ => {
// TODO: support oblique angle.
Style::Oblique
},
})
- .weight(Weight(style.font_weight.0))
- .stretch(Stretch(style.font_stretch.value()));
+ .weight(Weight(style.font_weight.value()))
+ .stretch(Stretch(style.font_stretch.to_percentage().0));
let font_handle = match SystemSource::new().select_best_match(&family_names, &properties) {
Ok(handle) => handle,
Err(e) => {