diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2014-05-18 03:50:12 +0100 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2014-05-30 00:52:12 +0100 |
commit | 23ef9809cecbeb112914306c41fb965a27c39d0a (patch) | |
tree | ee052c90f9cbe5369044a4d3733917251e685142 | |
parent | 18f02cba283171d5010815a7021ecd76d006d4c8 (diff) | |
download | libass-23ef9809cecbeb112914306c41fb965a27c39d0a.tar.bz2 libass-23ef9809cecbeb112914306c41fb965a27c39d0a.tar.xz |
Use FT_Outline_EmboldenXY if available
-rw-r--r-- | libass/ass_render.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 0d08dd9..f33e4d2 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -954,9 +954,15 @@ static void stroke_outline(ASS_Renderer *render_priv, FT_Outline *outline, outline->n_points = outline->n_contours = 0; FT_Stroker_ExportBorder(render_priv->state.stroker, border, outline); - // "Stroke" with the outline emboldener in two passes. + // "Stroke" with the outline emboldener (in two passes if needed). // The outlines look uglier, but the emboldening never adds any points } else { +#if (FREETYPE_MAJOR > 2) || \ + ((FREETYPE_MAJOR == 2) && (FREETYPE_MINOR > 4)) || \ + ((FREETYPE_MAJOR == 2) && (FREETYPE_MINOR == 4) && (FREETYPE_PATCH >= 10)) + FT_Outline_EmboldenXY(outline, sx * 2, sy * 2); + FT_Outline_Translate(outline, -sx, -sy); +#else int i; FT_Outline nol; @@ -973,6 +979,7 @@ static void stroke_outline(ASS_Renderer *render_priv, FT_Outline *outline, outline->points[i].y = nol.points[i].y; FT_Outline_Done(render_priv->ftlibrary, &nol); +#endif } } |