summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-12-07 06:08:39 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-12-07 06:08:39 +0000
commit77741531e266f127839c7bb8fefcea43f3c5ebe0 (patch)
treeac30ed4554c616b9cd0bae8df1c0c300689fc9b9
parent92e4745dbbd339b8756a6b793d1610462089e49f (diff)
downloadpango-77741531e266f127839c7bb8fefcea43f3c5ebe0.tar.gz
Print out an informative error message and exit(1) if no fonts are found.
Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com> * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns): Print out an informative error message and exit(1) if no fonts are found. (#98672) * pango/pangoft2.c (pango_ft2_font_get_face): Fix some bugs in the last commit.
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.pre-1-109
-rw-r--r--ChangeLog.pre-1-29
-rw-r--r--ChangeLog.pre-1-49
-rw-r--r--ChangeLog.pre-1-69
-rw-r--r--ChangeLog.pre-1-89
-rw-r--r--pango/pangofc-fontmap.c15
-rw-r--r--pango/pangofc-fontmap.cI15
-rw-r--r--pango/pangoft2.c7
-rw-r--r--pango/pangoxft-fontmap.c1
10 files changed, 85 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4641d745..4cc4a08b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns):
+ Print out an informative error message and exit(1) if
+ no fonts are found. (#98672)
+
+ * pango/pangoft2.c (pango_ft2_font_get_face): Fix some
+ bugs in the last commit.
+
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 4641d745..4cc4a08b 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,12 @@
+Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns):
+ Print out an informative error message and exit(1) if
+ no fonts are found. (#98672)
+
+ * pango/pangoft2.c (pango_ft2_font_get_face): Fix some
+ bugs in the last commit.
+
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 4641d745..4cc4a08b 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,12 @@
+Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns):
+ Print out an informative error message and exit(1) if
+ no fonts are found. (#98672)
+
+ * pango/pangoft2.c (pango_ft2_font_get_face): Fix some
+ bugs in the last commit.
+
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 4641d745..4cc4a08b 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,12 @@
+Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns):
+ Print out an informative error message and exit(1) if
+ no fonts are found. (#98672)
+
+ * pango/pangoft2.c (pango_ft2_font_get_face): Fix some
+ bugs in the last commit.
+
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 4641d745..4cc4a08b 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,12 @@
+Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns):
+ Print out an informative error message and exit(1) if
+ no fonts are found. (#98672)
+
+ * pango/pangoft2.c (pango_ft2_font_get_face): Fix some
+ bugs in the last commit.
+
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 4641d745..4cc4a08b 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,12 @@
+Sat Dec 7 01:05:25 2002 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns):
+ Print out an informative error message and exit(1) if
+ no fonts are found. (#98672)
+
+ * pango/pangoft2.c (pango_ft2_font_get_face): Fix some
+ bugs in the last commit.
+
Sat Dec 7 00:10:02 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2.c (pango_ft2_font_get_face): Don't
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index ad24a4d4..b5d9b722 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -584,7 +584,20 @@ pango_fc_font_map_get_patterns (PangoFontMap *fontmap,
font_patterns = FcFontSort (NULL, pattern, FcTrue, 0, &res);
if (!font_patterns)
- return NULL;
+ {
+ g_printerr ("No fonts found; this probably means that the fontconfig\n"
+ "library is not correctly configured. You may need to\n"
+ "edit the fonts.conf configuration file. More information\n"
+ "about fontconfig can be found in the fontconfig(3) manual\n"
+ "page and on http://fontconfig.org\n");
+
+ /* There is no point in proceeding; we'll just get a segfault later
+ * on, and a bunch more possibly confusing error messages in between.
+ */
+
+ /* return NULL; */
+ exit (1);
+ }
patterns = g_new (PangoFcPatternSet, 1);
patterns->patterns = g_new (FcPattern *, font_patterns->nfont);
diff --git a/pango/pangofc-fontmap.cI b/pango/pangofc-fontmap.cI
index ad24a4d4..b5d9b722 100644
--- a/pango/pangofc-fontmap.cI
+++ b/pango/pangofc-fontmap.cI
@@ -584,7 +584,20 @@ pango_fc_font_map_get_patterns (PangoFontMap *fontmap,
font_patterns = FcFontSort (NULL, pattern, FcTrue, 0, &res);
if (!font_patterns)
- return NULL;
+ {
+ g_printerr ("No fonts found; this probably means that the fontconfig\n"
+ "library is not correctly configured. You may need to\n"
+ "edit the fonts.conf configuration file. More information\n"
+ "about fontconfig can be found in the fontconfig(3) manual\n"
+ "page and on http://fontconfig.org\n");
+
+ /* There is no point in proceeding; we'll just get a segfault later
+ * on, and a bunch more possibly confusing error messages in between.
+ */
+
+ /* return NULL; */
+ exit (1);
+ }
patterns = g_new (PangoFcPatternSet, 1);
patterns->patterns = g_new (FcPattern *, font_patterns->nfont);
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index 60770be7..80c78a50 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -200,7 +200,6 @@ FT_Face
pango_ft2_font_get_face (PangoFont *font)
{
PangoFT2Font *ft2font = (PangoFT2Font *)font;
- FT_Face face;
FT_Error error;
FcPattern *pattern;
FcChar8 *filename;
@@ -256,9 +255,7 @@ pango_ft2_font_get_face (PangoFont *font)
load_fallback_face (ft2font, filename);
}
- face = ft2font->face;
-
- error = FT_Set_Char_Size (face,
+ error = FT_Set_Char_Size (ft2font->face,
PANGO_PIXELS_26_6 (ft2font->size),
PANGO_PIXELS_26_6 (ft2font->size),
0, 0);
@@ -266,7 +263,7 @@ pango_ft2_font_get_face (PangoFont *font)
g_warning ("Error in FT_Set_Char_Size: %d", error);
}
- return face;
+ return ft2font->face;
}
static GType
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index e8dd78f0..8b2030de 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -19,6 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <stdlib.h>
#include <string.h>
#include "pango-fontmap.h"