summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-02-11 06:39:19 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-02-11 06:39:19 +0000
commit1b2e543aa5bc412062c97a9d37c4c5292604025f (patch)
tree27844df3e53bc4b3001cb36fc55b29ba4b568fdc
parentb1c021842d26d5674a51f802f29e2a8496767c55 (diff)
downloadpango-1b2e543aa5bc412062c97a9d37c4c5292604025f.tar.gz
Fix some runtime and compile-time warnings.
Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer.c: Fix some runtime and compile-time warnings. * modules/hangul/hangul.c (hangul_engine_shape): Shape the string with the unknown glyph rather than giving a warning when the font doesn't have any of the necesary charsets.
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.pre-1-08
-rw-r--r--ChangeLog.pre-1-108
-rw-r--r--ChangeLog.pre-1-28
-rw-r--r--ChangeLog.pre-1-48
-rw-r--r--ChangeLog.pre-1-68
-rw-r--r--ChangeLog.pre-1-88
-rw-r--r--examples/viewer.c10
-rw-r--r--modules/hangul/hangul-x.c11
-rw-r--r--modules/hangul/hangul.c11
10 files changed, 82 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index caf182ba..8f8c6743 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index caf182ba..8f8c6743 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index caf182ba..8f8c6743 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index caf182ba..8f8c6743 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index caf182ba..8f8c6743 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index caf182ba..8f8c6743 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index caf182ba..8f8c6743 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,11 @@
+Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
+
+ * examples/viewer.c: Fix some runtime and compile-time warnings.
+
+ * modules/hangul/hangul.c (hangul_engine_shape): Shape the
+ string with the unknown glyph rather than giving a warning
+ when the font doesn't have any of the necesary charsets.
+
Thu Feb 10 19:57:27 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Add style selector, rewrite family
diff --git a/examples/viewer.c b/examples/viewer.c
index 2946dd70..4fe00d2a 100644
--- a/examples/viewer.c
+++ b/examples/viewer.c
@@ -816,7 +816,8 @@ reload_font ()
font = new_font;
}
- gtk_widget_queue_resize (layout);
+ if (layout)
+ gtk_widget_queue_resize (layout);
}
void
@@ -954,7 +955,8 @@ font_description_from_string (PangoFontDescription *desc, const char *name)
words = g_strsplit (name, " ", -1);
for (i=0; words[i]; i++)
{
- if (!(find_field (style_map, G_N_ELEMENTS (style_map), words[i], (int *)&desc->style) ||
+ if (!(strcasecmp (words[i], "Normal") == 0 ||
+ find_field (style_map, G_N_ELEMENTS (style_map), words[i], (int *)&desc->style) ||
find_field (variant_map, G_N_ELEMENTS (variant_map), words[i], (int *)&desc->variant) ||
find_field (weight_map, G_N_ELEMENTS (weight_map), words[i], (int *)&desc->weight) ||
find_field (stretch_map, G_N_ELEMENTS (stretch_map), words[i], (int *)&desc->stretch)))
@@ -987,9 +989,9 @@ compare_font_descriptions (const PangoFontDescription *a, const PangoFontDescrip
}
static int
-font_description_sort_func (const PangoFontDescription **a, const PangoFontDescription **b)
+font_description_sort_func (const void *a, const void *b)
{
- return compare_font_descriptions (*a, *b);
+ return compare_font_descriptions (*(PangoFontDescription **)a, *(PangoFontDescription **)b);
}
typedef struct
diff --git a/modules/hangul/hangul-x.c b/modules/hangul/hangul-x.c
index 65e9faf3..8b07f115 100644
--- a/modules/hangul/hangul-x.c
+++ b/modules/hangul/hangul-x.c
@@ -604,7 +604,16 @@ hangul_engine_shape (PangoFont *font,
if (!find_subfont (font, secondary_charset, G_N_ELEMENTS (secondary_charset), &subfont, &render_func))
if (!find_subfont (font, fallback_charsets, G_N_ELEMENTS (fallback_charsets), &subfont, &render_func))
{
- g_warning ("No available Hangul fonts.");
+ PangoGlyph unknown_glyph = pango_x_get_unknown_glyph (font);
+
+ n_chars = unicode_strlen (text, length);
+ pango_glyph_string_set_size (glyphs, n_chars);
+
+ for (i=0; i<n_chars; i++)
+ set_glyph (glyphs, i, font,
+ PANGO_X_GLYPH_SUBFONT (unknown_glyph),
+ PANGO_X_GLYPH_INDEX (unknown_glyph));
+
return;
}
diff --git a/modules/hangul/hangul.c b/modules/hangul/hangul.c
index 65e9faf3..8b07f115 100644
--- a/modules/hangul/hangul.c
+++ b/modules/hangul/hangul.c
@@ -604,7 +604,16 @@ hangul_engine_shape (PangoFont *font,
if (!find_subfont (font, secondary_charset, G_N_ELEMENTS (secondary_charset), &subfont, &render_func))
if (!find_subfont (font, fallback_charsets, G_N_ELEMENTS (fallback_charsets), &subfont, &render_func))
{
- g_warning ("No available Hangul fonts.");
+ PangoGlyph unknown_glyph = pango_x_get_unknown_glyph (font);
+
+ n_chars = unicode_strlen (text, length);
+ pango_glyph_string_set_size (glyphs, n_chars);
+
+ for (i=0; i<n_chars; i++)
+ set_glyph (glyphs, i, font,
+ PANGO_X_GLYPH_SUBFONT (unknown_glyph),
+ PANGO_X_GLYPH_INDEX (unknown_glyph));
+
return;
}