projects
/
m17n
/
m17n-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b51c757
)
(mfont__get_glyph_id): Return -1 if some code is invalid.
author
handa
<handa>
Sun, 6 Jan 2008 14:25:45 +0000
(14:25 +0000)
committer
handa
<handa>
Sun, 6 Jan 2008 14:25:45 +0000
(14:25 +0000)
src/font.c
patch
|
blob
|
history
diff --git
a/src/font.c
b/src/font.c
index
1bcae33
..
35cdea9
100644
(file)
--- a/
src/font.c
+++ b/
src/font.c
@@
-1676,6
+1676,7
@@
mfont__get_glyph_id (MFLTFont *font, MFLTGlyphString *gstring,
MFontEncoding *encoding;
MFontDriver *driver = NULL;
MGlyph *glyphs = (MGlyph *) gstring->glyphs;
+ int result = 0;
encoding = mfont->encoding ? mfont->encoding : find_encoding (mfont);
for (; from < to; from++)
@@
-1713,8
+1714,10
@@
mfont__get_glyph_id (MFLTFont *font, MFLTGlyphString *gstring,
}
}
g->g.encoded = 1;
+ if (g->g.code == MCHAR_INVALID_CODE)
+ result = -1;
}
- return 0;
+ return result;
}
int