Commit 5b021d3
Get name of fallback font from fontconfig
Changed files (3)
modifiedlibbirdfont/OverView.valamodifiedlibbirdfont/Renderer/CachedFont.valamodifiedlibbirdfont/Renderer/Text.vala
Diff
@@ -1304,6 +1304,7 @@ public class OverView : FontDisplay { character.set_text ((!) c.to_string ()); character.set_font_size (height); character.draw_at_top (cr, x + 10, y);+ printd ("Fallback font: " + character.get_font_file_name ()); cr.restore (); } @@ -72,6 +72,15 @@ public class CachedFont : GLib.Object { return g; }+ + public string get_font_file_name () {+ if (font == null) {+ warning ("No font loaded.");+ return "";+ }+ + return (((!) font).font_file != null) ? (!) ((!) font).font_file : "".dup ();+ } } }@@ -57,6 +57,10 @@ public class Text : Widget { set_font_size (size); } + public string get_font_file_name () {+ return cached_font.get_font_file_name ();+ }+ public void use_cache (bool cache) { use_cached_glyphs = cache; }