summaryrefslogtreecommitdiff
path: root/libappstream-builder
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-05-06 14:16:34 +0100
committerRichard Hughes <richard@hughsie.com>2015-05-06 14:16:38 +0100
commit6a27bb88ead9f9696c6e2964ca523ce55ab1e205 (patch)
tree3dadd039edeb75fb34fafa856ced5c08813e07fc /libappstream-builder
parent5d3ab35c4ad141ff510a5fa25a0dd77f0ac3bab4 (diff)
downloadappstream-glib-6a27bb88ead9f9696c6e2964ca523ce55ab1e205.tar.gz
Have another go at fixing font previews
Ensure that default configuration and fonts are not loaded. See http://mces.blogspot.co.uk/2015/05/how-to-use-custom-application-fonts.html
Diffstat (limited to 'libappstream-builder')
-rw-r--r--libappstream-builder/plugins/asb-plugin-font.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-font.c b/libappstream-builder/plugins/asb-plugin-font.c
index 1fe3c69..b809739 100644
--- a/libappstream-builder/plugins/asb-plugin-font.c
+++ b/libappstream-builder/plugins/asb-plugin-font.c
@@ -629,8 +629,13 @@ asb_plugin_font_app (AsbPlugin *plugin, AsbApp *app,
_cleanup_free_ gchar *icon_filename = NULL;
_cleanup_object_unref_ GdkPixbuf *pixbuf = NULL;
- /* load font */
+ /* create a new fontconfig configuration */
config = FcConfigCreate ();
+
+ /* ensure that default configuration and fonts are not loaded */
+ FcConfigSetCurrent (config);
+
+ /* add just this one font */
ret = FcConfigAppFontAddFile (config, (FcChar8 *) filename);
if (FALSE && !ret) { /* FIXME: fails since f22 even for success */
g_set_error (error,