summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-24 22:28:35 +0200
committerwm4 <wm4@nowhere>2013-09-24 22:28:35 +0200
commit05eb520f431e73c2ad19a8e0261f35d396545cf9 (patch)
treef3a2bff8aecde35d967105f15680753183e9f4db /libass/ass.h
parent7a2596b0e3a644f927046774dd748d5ff8e1b0c6 (diff)
downloadlibass-05eb520f431e73c2ad19a8e0261f35d396545cf9.tar.bz2
libass-05eb520f431e73c2ad19a8e0261f35d396545cf9.tar.xz
Restore hinting
This was broken since commit f780146. For reasons why, read the commit message of that commit. To make it short, we set the font size to something large and constant (256), and scale the font outlines returned by freetype to the size we need in order to get smooth animation and accurate positioning. Of course, this obviously breaks hinting. Fix hinting by not using the hack mentioned above if hinting enabled. To mitigate the issues caused by freetype grid fitting and extremely bad ASS scripts (such as setting font size to very small values and scaling them up with \fscx/y), we still adjust the font size such that the font is never scaled in Y direction (only in X direction, because the \fscx/y tags can change aspect ratio). Also see google code issue #46.
Diffstat (limited to 'libass/ass.h')
-rw-r--r--libass/ass.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libass/ass.h b/libass/ass.h
index 0778a5c..cb85a2c 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -56,6 +56,13 @@ typedef struct ass_image {
/*
* Hinting type. (see ass_set_hinting below)
*
+ * Setting hinting to anything but ASS_HINTING_NONE will put libass in a mode
+ * that reduces compatibility with vsfilter and many ASS scripts. The main
+ * problem is that hinting conflicts with smooth scaling, which precludes
+ * animations and precise positioning.
+ *
+ * In other words, enabling hinting might break some scripts severely.
+ *
* FreeType's native hinter is still buggy sometimes and it is recommended
* to use the light autohinter, ASS_HINTING_LIGHT, instead. For best
* compatibility with problematic fonts, disable hinting.