diff options
author | Grigori Goronzy <greg@hein> | 2009-07-07 20:25:55 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-07-07 23:07:50 +0200 |
commit | f54a0cf94853d8372225bb0b45d6bd2b8e4e6fde (patch) | |
tree | 9c0e3b14e8ecf6e8cc1fe3f2107aad94d134cdd4 /libass/ass_drawing.c | |
parent | 5a2b270b218a429763f0a032386705f55bca0a92 (diff) | |
download | libass-f54a0cf94853d8372225bb0b45d6bd2b8e4e6fde.tar.bz2 libass-f54a0cf94853d8372225bb0b45d6bd2b8e4e6fde.tar.xz |
Support for underline and strikethrough
Add support for the underline (\u) and strikethrough/strikeout (\s)
properties. This is a bit tricky, since FreeType doesn't offer
any method of adding the lines, so you have to draw them yourself.
libass uses various information from TrueType tables to get position
and size of the lines, does a few simple consistency checks (some fonts
might be broken) and if everything is alright, adds new contours for
the lines.
Sometimes, rendering errors can occur:
- Currently, kerning isn't taken into account, which means the lines
can overlap a little, leading to small optical glitches.
- Some (broken) fonts use the wrong winding direction. In this case,
the FreeType stroker will only consider the added lines to be "outside"
and only stroke the line instead of the whole glyph.
Diffstat (limited to 'libass/ass_drawing.c')
-rw-r--r-- | libass/ass_drawing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_drawing.c b/libass/ass_drawing.c index 30d742f..09cf2d0 100644 --- a/libass/ass_drawing.c +++ b/libass/ass_drawing.c @@ -40,7 +40,7 @@ static void drawing_make_glyph(ass_drawing_t *drawing, void *fontconfig_priv, // This is hacky... glyph = (FT_OutlineGlyph) ass_font_get_glyph(fontconfig_priv, font, - (uint32_t) ' ', hint); + (uint32_t) ' ', hint, 0); FT_Outline_Done(drawing->ftlibrary, &glyph->outline); FT_Outline_New(drawing->ftlibrary, GLYPH_INITIAL_POINTS, |