diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-0 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 7 | ||||
-rw-r--r-- | pango/pangoxft-font.c | 25 |
8 files changed, 74 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 3deda119..8b555536 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 3deda119..8b555536 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 3deda119..8b555536 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 3deda119..8b555536 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 3deda119..8b555536 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 3deda119..8b555536 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,10 @@ +Tue Feb 26 15:50:35 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangoxft-font.c (pango_xft_font_get_font): Try + to load something (load sans) if we can't load a font + that Xft listed. (Workaround for #72299, reported + by Gediminas Paulauskas) + Mon Feb 25 16:36:47 2002 Owen Taylor <otaylor@redhat.com> * modules/hebrew/hebrew-x.c pango/mini-fribidi/fribidi-types.h: diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c index cf511791..fef5e06a 100644 --- a/pango/pangoxft-font.c +++ b/pango/pangoxft-font.c @@ -19,6 +19,8 @@ * Boston, MA 02111-1307, USA. */ +#include <stdlib.h> + #include "pangoxft-private.h" #include "X11/Xft/XftFreetype.h" #include "pango-modules.h" @@ -594,6 +596,29 @@ pango_xft_font_get_font (PangoFont *font) _pango_xft_font_map_get_info (xfont->fontmap, &display, &screen); xfont->xft_font = XftFontOpenPattern (display, xfont->font_pattern); + if (!xfont->xft_font) + { + gchar *name = pango_font_description_to_string (xfont->description); + + /* No provision for failure here, unfortunately, various fonts + * fail only when FT tries to open them... e.g., fonts with only + * bitmaps. + */ + g_warning ("Cannot open font file for font %s", name); + g_free (name); + + xfont->xft_font = XftFontOpen (display, screen, + XFT_FAMILY, XftTypeString, "sans", + XFT_ENCODING, XftTypeString, "glyphs-fontspecific", + XFT_CORE, XftTypeBool, False, + XFT_SIZE, XftTypeDouble, (double)pango_font_description_get_size (xfont->description)/PANGO_SCALE, + NULL); + } + if (!xfont->xft_font) + { + g_warning ("Cannot open fallback font, nothing to do"); + exit (1); + } face = xfont->xft_font->u.ft.font->face; |