From 54bc6be222101e27b5f76f0d667c3e7290d109c1 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Thu, 18 Jan 2024 18:02:08 +0800 Subject: [PATCH] [11_29] Logging on font substitution (format) --- src/Graphics/Fonts/font_translate.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Graphics/Fonts/font_translate.cpp b/src/Graphics/Fonts/font_translate.cpp index a62818841b..ffe57b6d66 100644 --- a/src/Graphics/Fonts/font_translate.cpp +++ b/src/Graphics/Fonts/font_translate.cpp @@ -288,16 +288,16 @@ find_closest (string& family, string& variant, string& series, string& shape, font closest_font (string family, string variant, string series, string shape, int sz, int dpi, int attempt) { - string s= family * "-" * variant * "-" * series * "-" * shape * "-" * - as_string (sz) * "-" * as_string (dpi) * "-" * as_string (attempt); + string extra= + as_string (sz) * "-" * as_string (dpi) * "-" * as_string (attempt); + string s= family * "-" * variant * "-" * series * "-" * shape * "-" * extra; if (font::instances->contains (s)) return font (s); string orig_family= family; find_closest (family, variant, series, shape, attempt); if (orig_family != family) { - debug_fonts << "Font substitution: " << s << LF - << "-> " << family * "-" * variant * "-" * series * "-" * shape << "-" - << as_string (sz) * "-" * as_string (dpi) * "-" * as_string (attempt) - << LF; + string s2= + family * "-" * variant * "-" * series * "-" * shape * "-" * extra; + debug_fonts << "Font substitution: " << s << LF << "-> " << s2 << LF; } font fn= find_font (family, variant, series, shape, sz, dpi); // cout << "Found " << fn->res_name << "\n";