fonts: fix so it does not try for RobotoMonoMono.ttf (#6507)

pull/6510/head
JalonSolov 2020-09-29 06:20:37 -04:00 committed by GitHub
parent defa9c1d00
commit 2fd6c05445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -234,7 +234,7 @@ fn get_font_path_variant(font_path string, variant FontVariant) string {
}
}
.mono {
if fpath.ends_with('-Regular') {
if !fpath.ends_with('Mono-Regular') && fpath.ends_with('-Regular') {
fpath = fpath.replace('-Regular', 'Mono-Regular')
} else if fpath.to_lower().starts_with('arial') {
// Arial has no mono variant