diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-02-02 10:52:49 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-02-02 10:52:49 +0000 |
commit | da58dbfdea113caa46448c0bb3bf945b4a18f502 (patch) | |
tree | bd04c2e6d5d4f74ee5eef9a3dd8a1c2bdaeb5f7e /modules/hangul/hangul-fc.c | |
parent | 93be594100f783b409cba98f6c9d58060c4ef433 (diff) | |
download | pango-da58dbfdea113caa46448c0bb3bf945b4a18f502.tar.gz |
Use PANGO_GLYPH_NULL for when no glyph should be drawn. Use
2006-02-02 Behdad Esfahbod <behdad@gnome.org>
* modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c,
modules/basic/basic-fc.c, modules/basic/basic-win32.c,
modules/basic/basic-x.c, modules/hangul/hangul-fc.c,
modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c,
modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c,
modules/thai/thai-fc.c, modules/tibetan/tibetan-fc.c,
pango/fonts.c, pango/pango-engine-private.h pango/pango-types.h,
pango/pangocairo-fcfont.c, pango/pangocairo-font.c,
pango/pangocairo-private.h, pango/pangocairo-render.c,
pango/pangofc-decoder.c, pango/pangofc-font.c,
pango/pangoft2-render.c, pango/pangoft2.c pango/pangowin32.c,
pango/pangox.c, pango/pangoxft-font.c pango/pangoxft-private.h,
pango/pangoxft-render.c, pango/shape.c: Use PANGO_GLYPH_NULL for
when no glyph should be drawn. Use PANGO_GLYPH_UNKNOWN_FLAG for
all backends to mark unknown flags. There's no need for
pango_font_get_unknown_glyph() anymore, since all backends know
how to handle PANGO_GLYPH_UNKNOWN_FLAG gracefully. We may add
that in the future however. (fixes bug #73147, closes bug #329524)
Diffstat (limited to 'modules/hangul/hangul-fc.c')
-rw-r--r-- | modules/hangul/hangul-fc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c index 991b305f..5d3e0f73 100644 --- a/modules/hangul/hangul-fc.c +++ b/modules/hangul/hangul-fc.c @@ -138,7 +138,7 @@ render_tone (PangoFont *font, gunichar tone, PangoGlyphString *glyphs, index = find_char (font, tone); pango_glyph_string_set_size (glyphs, *n_glyphs + 1); - if (index) + if (index != PANGO_GLYPH_NULL) { set_glyph_tone (font, glyphs, *n_glyphs, cluster_offset, index); } @@ -146,7 +146,7 @@ render_tone (PangoFont *font, gunichar tone, PangoGlyphString *glyphs, { /* fall back : HTONE1(0x302e) => middle-dot, HTONE2(0x302f) => colon */ index = find_char (font, tone == HTONE1 ? 0x00b7 : 0x003a); - if (index) + if (index != PANGO_GLYPH_NULL) { set_glyph_tone (font, glyphs, *n_glyphs, cluster_offset, index); } @@ -167,11 +167,11 @@ render_isolated_tone (PangoFont *font, gunichar tone, PangoGlyphString *glyphs, /* Find a base character to render the mark on */ int index = find_char (font, 0x25cc); /* DOTTED CIRCLE */ - if (!index) + if (index == PANGO_GLYPH_NULL) index = find_char (font, 0x25cb); /* WHITE CIRCLE, in KSC-5601 */ - if (!index) + if (index == PANGO_GLYPH_NULL) index = find_char (font, ' '); /* Space */ - if (!index) /* Unknown glyph box with 0000 in it */ + if (index == PANGO_GLYPH_NULL) /* Unknown glyph box with 0000 in it */ index = find_char (font, get_unknown_glyph (font, 0)); /* Add the base character @@ -217,7 +217,7 @@ render_syllable (PangoFont *font, gunichar *text, int length, wc = S_FROM_LV(text[0], text[1]); index = find_char (font, wc); pango_glyph_string_set_size (glyphs, *n_glyphs + 1); - if (!index) + if (index == PANGO_GLYPH_NULL) set_glyph (font, glyphs, *n_glyphs, cluster_offset, get_unknown_glyph (font, wc)); else @@ -236,7 +236,7 @@ render_syllable (PangoFont *font, gunichar *text, int length, continue; index = find_char (font, text[i]); - if (index) + if (index != PANGO_GLYPH_NULL) { pango_glyph_string_set_size (glyphs, *n_glyphs + 1); set_glyph (font, glyphs, *n_glyphs, cluster_offset, index); @@ -250,9 +250,9 @@ render_syllable (PangoFont *font, gunichar *text, int length, for (j = 0; j < 3 && (__jamo_to_ksc5601[jindex][j] != 0); j++) { wc = __jamo_to_ksc5601[jindex][j] - KSC_JAMOBASE + UNI_JAMOBASE; - index = (wc >= 0x3131) ? find_char (font, wc) : 0; + index = (wc >= 0x3131) ? find_char (font, wc) : PANGO_GLYPH_NULL; pango_glyph_string_set_size (glyphs, *n_glyphs + 1); - if (!index) + if (index == PANGO_GLYPH_NULL) set_glyph (font, glyphs, *n_glyphs, cluster_offset, get_unknown_glyph (font, index)); else @@ -264,7 +264,7 @@ render_syllable (PangoFont *font, gunichar *text, int length, { index = find_char (font, 0x3164); pango_glyph_string_set_size (glyphs, *n_glyphs + 1); - if (!index) + if (index == PANGO_GLYPH_NULL) set_glyph (font, glyphs, *n_glyphs, cluster_offset, get_unknown_glyph (font, index)); else @@ -287,12 +287,12 @@ render_basic (PangoFont *font, gunichar wc, index = find_char (font, wc); pango_glyph_string_set_size (glyphs, *n_glyphs + 1); - if (index) + if (index != PANGO_GLYPH_NULL) set_glyph (font, glyphs, *n_glyphs, cluster_offset, index); else { if (pango_is_zero_width (wc)) - set_glyph (font, glyphs, *n_glyphs, cluster_offset, 0); + set_glyph (font, glyphs, *n_glyphs, cluster_offset, PANGO_GLYPH_NULL); else set_glyph (font, glyphs, *n_glyphs, cluster_offset, get_unknown_glyph (font, wc)); |