From 2fd6c0544580cc3b321ee90b662eedcadfc5766e Mon Sep 17 00:00:00 2001 From: JalonSolov Date: Tue, 29 Sep 2020 06:20:37 -0400 Subject: [PATCH] fonts: fix so it does not try for RobotoMonoMono.ttf (#6507) --- vlib/gg/text_rendering.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/gg/text_rendering.v b/vlib/gg/text_rendering.v index ac27ebe3fe..808548dfb8 100644 --- a/vlib/gg/text_rendering.v +++ b/vlib/gg/text_rendering.v @@ -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 @@ -248,6 +248,6 @@ fn get_font_path_variant(font_path string, variant FontVariant) string { fn debug_font_println(s string) { $if debug_font? { - println(s) + println(s) } }