Commit 1fc200d6 authored by Jason Rumney's avatar Jason Rumney

(uniscribe_encode_char): Return FONT_INVALID_CHAR

when character maps to .notdef character.
parent 9992ea0c
2008-12-21 Jason Rumney <jasonr@gnu.org>
* w32uniscribe.c (uniscribe_encode_char): Return FONT_INVALID_CHAR
when character maps to .notdef character.
2008-12-21 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (cmd_error_internal): Don't exit in daemon mode, bug#1310.
......
......@@ -516,7 +516,10 @@ uniscribe_encode_char (font, c)
if (SUCCEEDED (result) && nglyphs == 1)
{
code = glyphs[0];
/* Some fonts return .notdef glyphs instead of failing.
(Truetype spec reserves glyph code 0 for .notdef) */
if (glyphs[0])
code = glyphs[0];
}
else if (SUCCEEDED (result) || result == E_OUTOFMEMORY)
{
......@@ -526,11 +529,8 @@ uniscribe_encode_char (font, c)
later. */
result = ScriptGetCMap (context, &(uniscribe_font->cache),
ch, len, 0, glyphs);
if (SUCCEEDED (result))
if (SUCCEEDED (result) && glyphs[0])
code = glyphs[0];
else
code = 0; /* notdef - enough in some cases to get the script
engine working, but not others... */
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment