summaryrefslogtreecommitdiff
path: root/src/xutf8/utf8Wrap.c
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-08-08 12:24:54 +0000
committerManolo Gouy <Manolo>2011-08-08 12:24:54 +0000
commit59fdc24b167edd2524579d14144021b093c1d3f5 (patch)
tree26d6b9d6d6c8f605b4f9e185495892b247cccfd2 /src/xutf8/utf8Wrap.c
parentde0be01e2321ad0b682e85fdb7ec1dd427dfd897 (diff)
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
Diffstat (limited to 'src/xutf8/utf8Wrap.c')
-rw-r--r--src/xutf8/utf8Wrap.c4
1 files changed, 3 insertions, 1 deletions
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