when character maps to .notdef character.
+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.
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)
{
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... */
}
}
}