Skip to content

Commit a45124d

Browse files
authored
fix: Cast font size to f64 on Windows (#664)
1 parent ae0ead8 commit a45124d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

platforms/windows/src/text.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ impl ITextRangeProvider_Impl for PlatformRange_Impl {
452452
UIA_FontNameAttributeId => {
453453
self.read(|range| Ok(Variant::from(range.font_family()).into()))
454454
}
455-
UIA_FontSizeAttributeId => {
456-
self.read(|range| Ok(Variant::from(range.font_size()).into()))
457-
}
455+
UIA_FontSizeAttributeId => self.read(|range| {
456+
Ok(Variant::from(range.font_size().map(|value| value as f64)).into())
457+
}),
458458
UIA_FontWeightAttributeId => self.read(|range| {
459459
Ok(Variant::from(range.font_weight().map(|value| value as i32)).into())
460460
}),

0 commit comments

Comments
 (0)