diff options
author | Grigori Goronzy <greg@blackbox> | 2009-09-08 22:21:43 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-09-08 22:21:43 +0200 |
commit | 0d3ddc12295e38cdcb11c79f8dcb5c8d9f1a8b69 (patch) | |
tree | cdbd5facfdb64aec15c8ff9f35c55ed51cc03463 /libass/ass.c | |
parent | 9c7d5d41736ddb5dc11574c122807e484d774856 (diff) | |
download | libass-0d3ddc12295e38cdcb11c79f8dcb5c8d9f1a8b69.tar.bz2 libass-0d3ddc12295e38cdcb11c79f8dcb5c8d9f1a8b69.tar.xz |
Disable kerning by default and make it configurable
Kerning causes problems with many (broken) fonts. VSFilter doesn't use
kerning so these problems won't be apparant, while libass uses kerning
by default.
For compatibility reasons, disable kerning by default. In addition,
make it configurable through style overrides and the Script Info
header.
I.e. put "Kerning: yes" into the Script Info header to enable kerning.
With MPlayer, using "-ass-force-style Kerning=yes" will always
enable kerning.
This also includes a minor ABI change for tracking the kerning boolean.
As this only affects code that creates or modifies ASS_Tracks manually,
and I'm not aware of anyone doing that, the SONAME will not be bumped.
Diffstat (limited to 'libass/ass.c')
-rw-r--r-- | libass/ass.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass.c b/libass/ass.c index 057a6e34..f7f5bccd 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -389,6 +389,8 @@ void ass_process_force_style(ASS_Track *track) track->WrapStyle = atoi(token); else if (!strcasecmp(*fs, "ScaledBorderAndShadow")) track->ScaledBorderAndShadow = parse_bool(token); + else if (!strcasecmp(*fs, "Kerning")) + track->Kerning = parse_bool(token); dt = strrchr(*fs, '.'); if (dt) { @@ -571,6 +573,8 @@ static int process_info_line(ASS_Track *track, char *str) track->WrapStyle = atoi(str + 10); } else if (!strncmp(str, "ScaledBorderAndShadow:", 22)) { track->ScaledBorderAndShadow = parse_bool(str + 22); + } else if (!strncmp(str, "Kerning:", 8)) { + track->Kerning = parse_bool(str + 8); } return 0; } |