diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-05-12 16:32:55 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-05-12 16:32:55 -0300 |
commit | e3acfdf0b0b71c3180b756bdc7ff4a8090bb5e00 (patch) | |
tree | da2f71ca3469aea362df4b9885b01bcc068bfc91 /pcr/font-manager/0001-nonexistent_cache.patch | |
parent | 6abc75d5f0c4d5c8302715a7da59cc02d22fbe36 (diff) | |
parent | 8d0f4ac4cbf56fc5c5cadb5ba09c35e3674a886b (diff) | |
download | abslibre-e3acfdf0b0b71c3180b756bdc7ff4a8090bb5e00.tar.gz abslibre-e3acfdf0b0b71c3180b756bdc7ff4a8090bb5e00.tar.bz2 abslibre-e3acfdf0b0b71c3180b756bdc7ff4a8090bb5e00.zip |
Merge branch 'master' of vparabola:abslibre
Conflicts:
pcr/tomb/PKGBUILD
Diffstat (limited to 'pcr/font-manager/0001-nonexistent_cache.patch')
-rw-r--r-- | pcr/font-manager/0001-nonexistent_cache.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/pcr/font-manager/0001-nonexistent_cache.patch b/pcr/font-manager/0001-nonexistent_cache.patch new file mode 100644 index 000000000..effd89320 --- /dev/null +++ b/pcr/font-manager/0001-nonexistent_cache.patch @@ -0,0 +1,71 @@ +Description: Don't remove cache dir if non-existent. +Origin: upstream, http://code.google.com/p/font-manager/source/detail?r=261 +Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=658328 +--- + src/lib/fm-fontutils.c | 16 ++++++++-------- + src/ui/fontconfig.py | 8 +++++--- + 2 files changed, 13 insertions(+), 11 deletions(-) + +--- font-manager.orig/src/lib/fm-fontutils.c ++++ font-manager/src/lib/fm-fontutils.c +@@ -72,8 +72,8 @@ FcListFiles() + { + FcChar8 *file; + +- FcPatternGetString(fontset->fonts[i], FC_FILE, 0, &file); +- filelist = g_slist_prepend(filelist, g_strdup((const gchar *) file)); ++ if (FcPatternGetString(fontset->fonts[i], FC_FILE, 0, &file) == FcResultMatch) ++ filelist = g_slist_prepend(filelist, g_strdup((const gchar *) file)); + } + + if (objectset) +@@ -272,7 +272,7 @@ _get_base_font_info(FontInfo *fontinfo, + PangoFontDescription *descr; + + /* Need to add this font to the configuration, it may not be there in the +- * case where this the font is not installed yet or possibly just installed ++ * case where this font is not installed yet or possibly just installed + */ + FcConfigAppFontAddFile(FcConfigGetCurrent(), filepath); + +@@ -287,10 +287,10 @@ _get_base_font_info(FontInfo *fontinfo, + FcChar8 *family, + *style; + +- FcPatternGetString(fontset->fonts[i], FC_FAMILY, 0, &family); +- FcPatternGetString(fontset->fonts[i], FC_STYLE, 0, &style); +- ADD_PROP(fontinfo->family, family); +- ADD_PROP(fontinfo->style, style); ++ if (FcPatternGetString(fontset->fonts[i], FC_FAMILY, 0, &family) == FcResultMatch) ++ ADD_PROP(fontinfo->family, family); ++ if (FcPatternGetString(fontset->fonts[i], FC_STYLE, 0, &style) == FcResultMatch) ++ ADD_PROP(fontinfo->style, style); + } + + descr = pango_fc_font_description_from_pattern(pattern, FALSE); +@@ -539,7 +539,7 @@ static const struct + } + NoticeData[] = + { +- {"Bigelow", "B&H"}, ++ {"Bigelow", "Bigelow & Holmes"}, + {"Adobe", "Adobe"}, + {"Bitstream", "Bitstream"}, + {"Monotype", "Monotype"}, +--- font-manager.orig/src/ui/fontconfig.py ++++ font-manager/src/ui/fontconfig.py +@@ -376,9 +376,11 @@ class ConfigEdit(gtk.Window): + for name in self.cache.iterkeys(): + discard_fontconfig_settings(self.cache[name]) + self.save_settings(None) +- os.unlink(join(CACHE_DIR, CACHED_SETTINGS)) +- os.unlink(join(USER_FONT_CONFIG_DIR, +- '25-{0}.conf'.format(self.selected_family.get_name()))) ++ cache = join(CACHE_DIR, CACHED_SETTINGS) ++ not exists(cache) or os.unlink(cache) ++ cache = join(USER_FONT_CONFIG_DIR, ++ '25-{0}.conf'.format(self.selected_family.get_name())) ++ not exists(cache) or os.unlink(cache) + return + + def save_cache(self): |