From 59fdc24b167edd2524579d14144021b093c1d3f5 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 8 Aug 2011 12:24:54 +0000 Subject: Fix STR #2688. fl_width(' ') was wrong under X11 without XFT. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/xutf8/utf8Wrap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/xutf8/utf8Wrap.c b/src/xutf8/utf8Wrap.c index 3a0266ef0..1ca187cf5 100644 --- a/src/xutf8/utf8Wrap.c +++ b/src/xutf8/utf8Wrap.c @@ -900,6 +900,7 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set, int nb_font; /* quantity of fonts in the font array */ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */ int *ranges; /* sub range of iso10646 */ + unsigned int no_spc; nb_font = font_set->nb_font; x = 0; @@ -924,7 +925,8 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set, first = fnum; last_fnum = fnum; - ucs = XUtf8IsNonSpacing(ucs); + no_spc = XUtf8IsNonSpacing(ucs); + if (no_spc) ucs = no_spc; /* * find the first encoding which can be used to -- cgit v1.2.3