Use font style for fontconfig fallback

This commit is contained in:
Kirill Chibisov 2020-03-17 04:50:12 +03:00 committed by GitHub
parent b48e2fc2d8
commit 6ad0be5fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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();