summaryrefslogtreecommitdiffstats
path: root/font
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-03-17 04:50:12 +0300
committerGitHub <noreply@github.com>2020-03-17 01:50:12 +0000
commit6ad0be5fb36ee6fbb5e360664778450c5bdfe6bb (patch)
treec830a2238716ee0c7a65d2c253b3834fe67fc03c /font
parentb48e2fc2d813723ac73030b2e8f5a21ad5fd37ed (diff)
Use font style for fontconfig fallback
Diffstat (limited to 'font')
-rw-r--r--font/src/ft/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs
index d2a99cae..d393b63f 100644
--- a/font/src/ft/mod.rs
+++ b/font/src/ft/mod.rs
@@ -215,7 +215,6 @@ impl FreeTypeRasterizer {
let mut pattern = Pattern::new();
pattern.add_family(&desc.name);
pattern.add_pixelsize(size);
- let hash = pattern.hash();
// Add style to a pattern
match desc.style {
@@ -230,6 +229,9 @@ impl FreeTypeRasterizer {
},
}
+ // Hash requested pattern
+ let hash = pattern.hash();
+
pattern.config_substitute(config, fc::MatchKind::Pattern);
pattern.default_substitute();