Skip to content

Commit

Permalink
[11_29] Logging on font substitution (format)
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Jan 18, 2024
1 parent 8e47246 commit 2420cf7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Graphics/Fonts/font_translate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,15 @@ 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";
Expand Down

0 comments on commit 2420cf7

Please sign in to comment.