summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@kinoho.net>2014-06-02 00:16:28 +0200
committerGrigori Goronzy <greg@kinoho.net>2014-06-02 00:16:28 +0200
commit4a4e464d1dadce90bc91dce5448890e987019d89 (patch)
treec3ae3c5d6f081e439212bf7c11dcb9e28988d386
parent4648a02281ff0860cb06e3f56df9095b8a114294 (diff)
parent23ef9809cecbeb112914306c41fb965a27c39d0a (diff)
downloadlibass-4a4e464d1dadce90bc91dce5448890e987019d89.tar.bz2
libass-4a4e464d1dadce90bc91dce5448890e987019d89.tar.xz
Merge pull request #100 from astiob/stroke
Use FT_Outline_EmboldenXY
-rw-r--r--libass/ass_render.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index c64100f..0cc1848 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -936,9 +936,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;
@@ -955,6 +961,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
}
}