From: Grigori Goronzy Date: Thu, 10 Sep 2009 02:47:21 +0000 (+0200) Subject: Render NBSP (\h) as normal space X-Git-Tag: 0.9.8~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33a3ab2c8777241b73ad85024158e19fb1f9c699;p=libass Render NBSP (\h) as normal space Many fonts don't have a non-breaking space (NBSP) character and this can cause problems when these glyphs are substituted. Render them like a regular space. --- diff --git a/libass/ass_font.c b/libass/ass_font.c index 2e8548c..7d848a2 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -421,6 +421,9 @@ FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font, if (ch < 0x20) return 0; + // Handle NBSP like a regular space when rendering the glyph + if (ch == 0xa0) + ch = ' '; if (font->n_faces == 0) return 0;