summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/arabic/arabic-fc.c6
-rw-r--r--modules/basic/basic-atsui.c2
-rw-r--r--modules/basic/basic-fc.c6
-rw-r--r--modules/basic/basic-win32.c4
-rw-r--r--modules/basic/basic-x.c8
-rw-r--r--modules/hangul/hangul-fc.c34
-rw-r--r--modules/hebrew/hebrew-fc.c4
-rw-r--r--modules/indic/indic-fc.c9
-rw-r--r--modules/khmer/khmer-fc.c2
-rw-r--r--modules/syriac/syriac-fc.c6
-rw-r--r--modules/thai/thai-fc.c2
-rw-r--r--modules/tibetan/tibetan-fc.c2
12 files changed, 42 insertions, 43 deletions
diff --git a/modules/arabic/arabic-fc.c b/modules/arabic/arabic-fc.c
index 84663d45..355646a7 100644
--- a/modules/arabic/arabic-fc.c
+++ b/modules/arabic/arabic-fc.c
@@ -209,13 +209,13 @@ fallback_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
+ set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY);
}
else
{
index = pango_fc_font_get_glyph (fc_font, wc);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
index = pango_fc_font_get_unknown_glyph (fc_font, wc);
set_glyph (font, glyphs, i, p - text, index);
@@ -317,7 +317,7 @@ arabic_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc)) /* Zero-width characters */
{
- pango_ot_buffer_add_glyph (buffer, 0, properties[i], p - text);
+ pango_ot_buffer_add_glyph (buffer, PANGO_GLYPH_EMPTY, properties[i], p - text);
}
else
{
diff --git a/modules/basic/basic-atsui.c b/modules/basic/basic-atsui.c
index 72d83db4..b394102c 100644
--- a/modules/basic/basic-atsui.c
+++ b/modules/basic/basic-atsui.c
@@ -160,7 +160,7 @@ basic_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
+ set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY);
}
else
{
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c
index f73f1a56..5b8d90bf 100644
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@ -166,13 +166,13 @@ fallback_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
+ set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY);
}
else
{
index = pango_fc_font_get_glyph (fc_font, wc);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
{
index = pango_fc_font_get_unknown_glyph (fc_font, wc);
set_glyph (font, glyphs, i, p - text, index);
@@ -382,7 +382,7 @@ basic_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc)) /* Zero-width characters */
{
- pango_ot_buffer_add_glyph (buffer, 0, unknown_property, p - text);
+ pango_ot_buffer_add_glyph (buffer, PANGO_GLYPH_EMPTY, unknown_property, p - text);
}
else
{
diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c
index 433eb21a..2b6c6017 100644
--- a/modules/basic/basic-win32.c
+++ b/modules/basic/basic-win32.c
@@ -1003,12 +1003,12 @@ basic_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
+ set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY);
}
else
{
index = find_char (font, wc);
- if (index != PANGO_GLYPH_NULL)
+ if (index)
{
set_glyph (font, glyphs, i, p - text, index);
diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c
index 1e0a66a0..ffd07329 100644
--- a/modules/basic/basic-x.c
+++ b/modules/basic/basic-x.c
@@ -284,7 +284,7 @@ find_char (CharCache *cache, PangoFont *font, gunichar wc, const char *input)
}
}
- return PANGO_GLYPH_NULL;
+ return 0;
}
static void
@@ -610,12 +610,12 @@ basic_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
+ set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY);
}
else
{
index = find_char (cache, font, wc, input);
- if (index != PANGO_GLYPH_NULL)
+ if (index)
{
set_glyph (font, glyphs, i, p - text, index);
@@ -680,7 +680,7 @@ basic_engine_covers (PangoEngineShape *engine,
g_unichar_to_utf8 (wc, buf);
- return find_char (cache, font, wc, buf) != PANGO_GLYPH_NULL ? PANGO_COVERAGE_EXACT : PANGO_COVERAGE_NONE;
+ return find_char (cache, font, wc, buf) ? PANGO_COVERAGE_EXACT : PANGO_COVERAGE_NONE;
}
static void
diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c
index 5d3e0f73..0b12c94a 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 != PANGO_GLYPH_NULL)
+ if (index)
{
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 != PANGO_GLYPH_NULL)
+ if (index)
{
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 == PANGO_GLYPH_NULL)
+ if (!index)
index = find_char (font, 0x25cb); /* WHITE CIRCLE, in KSC-5601 */
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
index = find_char (font, ' '); /* Space */
- if (index == PANGO_GLYPH_NULL) /* Unknown glyph box with 0000 in it */
+ if (!index) /* 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 == PANGO_GLYPH_NULL)
+ if (!index)
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 != PANGO_GLYPH_NULL)
+ if (index)
{
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) : PANGO_GLYPH_NULL;
+ index = (wc >= 0x3131) ? find_char (font, wc) : 0;
pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
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 == PANGO_GLYPH_NULL)
+ if (!index)
set_glyph (font, glyphs, *n_glyphs, cluster_offset,
get_unknown_glyph (font, index));
else
@@ -285,17 +285,17 @@ render_basic (PangoFont *font, gunichar wc,
if (wc == 0xa0) /* non-break-space */
wc = 0x20;
- index = find_char (font, wc);
pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- if (index != PANGO_GLYPH_NULL)
- set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
+
+ if (pango_is_zero_width (wc))
+ set_glyph (font, glyphs, *n_glyphs, cluster_offset, PANGO_GLYPH_EMPTY);
else
{
- if (pango_is_zero_width (wc))
- set_glyph (font, glyphs, *n_glyphs, cluster_offset, PANGO_GLYPH_NULL);
+ index = find_char (font, wc);
+ if (index)
+ set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
else
- set_glyph (font, glyphs, *n_glyphs, cluster_offset,
- get_unknown_glyph (font, wc));
+ set_glyph (font, glyphs, *n_glyphs, cluster_offset, get_unknown_glyph (font, wc));
}
(*n_glyphs)++;
}
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c
index fd12d983..b396fa92 100644
--- a/modules/hebrew/hebrew-fc.c
+++ b/modules/hebrew/hebrew-fc.c
@@ -348,13 +348,13 @@ hebrew_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc)) /* Zero-width characters */
{
- pango_ot_buffer_add_glyph (buffer, PANGO_GLYPH_NULL, unknown_property, p - text);
+ pango_ot_buffer_add_glyph (buffer, PANGO_GLYPH_EMPTY, unknown_property, p - text);
}
else
{
index = pango_fc_font_get_glyph (fc_font, wc);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
{
pango_ot_buffer_add_glyph (buffer, pango_fc_font_get_unknown_glyph (fc_font, wc),
unknown_property, p - text);
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index 187067cb..4cfcf7ae 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -266,22 +266,21 @@ set_glyphs (PangoFont *font,
fc_font = PANGO_FC_FONT (font);
- for (i = 0; i < n_glyphs; i += 1)
+ for (i = 0; i < n_glyphs; i++)
{
guint glyph;
if (pango_is_zero_width (wcs[i]) &&
(!process_zwj || wcs[i] != 0x200D))
- glyph = PANGO_GLYPH_NULL;
+ glyph = PANGO_GLYPH_EMPTY;
else
{
glyph = pango_fc_font_get_glyph (fc_font, wcs[i]);
- if (glyph == PANGO_GLYPH_NULL)
+ if (!glyph)
glyph = pango_fc_font_get_unknown_glyph (fc_font, wcs[i]);
-
- pango_ot_buffer_add_glyph (buffer, glyph, tags[i], i);
}
+ pango_ot_buffer_add_glyph (buffer, glyph, tags[i], i);
}
}
diff --git a/modules/khmer/khmer-fc.c b/modules/khmer/khmer-fc.c
index ee585d31..75cebf87 100644
--- a/modules/khmer/khmer-fc.c
+++ b/modules/khmer/khmer-fc.c
@@ -508,7 +508,7 @@ static PangoGlyph
get_index (PangoFcFont *fc_font, gunichar wc)
{
PangoGlyph index = pango_fc_font_get_glyph (fc_font, wc);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
index = pango_fc_font_get_unknown_glyph (fc_font, wc);
return index;
}
diff --git a/modules/syriac/syriac-fc.c b/modules/syriac/syriac-fc.c
index 60cadd36..876e725d 100644
--- a/modules/syriac/syriac-fc.c
+++ b/modules/syriac/syriac-fc.c
@@ -201,13 +201,13 @@ fallback_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_NULL);
+ set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY);
}
else
{
index = pango_fc_font_get_glyph (fc_font, wc);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
index = pango_fc_font_get_unknown_glyph (fc_font, wc);
set_glyph (font, glyphs, i, p - text, index);
@@ -301,7 +301,7 @@ syriac_engine_shape (PangoEngineShape *engine,
if (pango_is_zero_width (wc))
{
- pango_ot_buffer_add_glyph (buffer, 0, properties[i], p - text);
+ pango_ot_buffer_add_glyph (buffer, PANGO_GLYPH_EMPTY, properties[i], p - text);
}
else
{
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index 46d77e71..9a038e8b 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -228,7 +228,7 @@ thai_make_glyph_uni (ThaiFontInfo *font_info, gunichar uc)
PangoFcFont *fc_font = (PangoFcFont *)font_info->font;
result = pango_fc_font_get_glyph (fc_font, uc);
- if (result != PANGO_GLYPH_NULL)
+ if (result)
return result;
else
return pango_fc_font_get_unknown_glyph (fc_font, uc);
diff --git a/modules/tibetan/tibetan-fc.c b/modules/tibetan/tibetan-fc.c
index 7294724b..77a10ca7 100644
--- a/modules/tibetan/tibetan-fc.c
+++ b/modules/tibetan/tibetan-fc.c
@@ -473,7 +473,7 @@ static PangoGlyph
get_index (PangoFcFont *fc_font, gunichar wc)
{
PangoGlyph index = pango_fc_font_get_glyph (fc_font, wc);
- if (index == PANGO_GLYPH_NULL)
+ if (!index)
index = pango_fc_font_get_unknown_glyph (fc_font, wc);
return index;
}