summaryrefslogtreecommitdiff
path: root/modules/basic/basic-x.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-03-25 20:50:39 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-03-25 20:50:39 +0000
commitb7418a446d73d7c9b504dcc06f647eb8931014c7 (patch)
tree079147a2bfe168dfd7bbe2c730170920b36e7471 /modules/basic/basic-x.c
parentcb3f2bba1b88269086521993c9227710c314eebe (diff)
downloadpango-b7418a446d73d7c9b504dcc06f647eb8931014c7.tar.gz
Convert U+00A0 (NON BREAK SPACE) to U+0020 (SPACE)
Mon Mar 25 15:46:54 2002 Owen Taylor <otaylor@redhat.com> * modules/basic/basic-*.c: Convert U+00A0 (NON BREAK SPACE) to U+0020 (SPACE) * modules/basic/basic-xft.c (basic_engine_shape): Remove some dead code.
Diffstat (limited to 'modules/basic/basic-x.c')
-rw-r--r--modules/basic/basic-x.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c
index 6e92531b..ced21fd8 100644
--- a/modules/basic/basic-x.c
+++ b/modules/basic/basic-x.c
@@ -533,7 +533,7 @@ basic_engine_shape (PangoFont *font,
const char *input;
wc = g_utf8_get_char (p);
-
+
input = p;
if (analysis->level % 2)
if (pango_get_mirror_char (wc, &mirrored_ch))
@@ -544,6 +544,14 @@ basic_engine_shape (PangoFont *font,
input = buf;
}
+ if (wc == 0xa0) /* non-break-space */
+ {
+ wc = 0x20;
+
+ g_unichar_to_utf8 (wc, buf);
+ input = buf;
+ }
+
if (ZERO_WIDTH_CHAR (wc))
{
set_glyph (font, glyphs, i, p - text, 0);