summaryrefslogtreecommitdiff
path: root/src/font.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-06-22 12:51:06 +0200
committerLaurenz <laurmaedje@gmail.com>2019-06-22 12:51:06 +0200
commitc7ee2b393a369325b3578557e045f2ff94ceab8f (patch)
tree063e371b764b119e378644817cc556c397ebd9dd /src/font.rs
parentf6fe3b5cdd2805f3975985752f9cb0e04e3daf49 (diff)
Fix top-left text alignment 📐
Diffstat (limited to 'src/font.rs')
-rw-r--r--src/font.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/font.rs b/src/font.rs
index 9b13ed32..d11fe75c 100644
--- a/src/font.rs
+++ b/src/font.rs
@@ -60,7 +60,7 @@ impl Font {
// Create a conversion function between font units and sizes.
let font_unit_ratio = 1.0 / (head.units_per_em as f32);
- let font_unit_to_size = |x| Size::points(font_unit_ratio * x as f32);
+ let font_unit_to_size = |x| Size::pt(font_unit_ratio * x as f32);
// Find out the name of the font.
let font_name = name.get_decoded(NameEntry::PostScriptName)