summaryrefslogtreecommitdiffstats
path: root/libass/ass_parse.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-02-18 05:27:16 +0100
committerGrigori Goronzy <greg@blackbox>2010-04-11 01:59:28 +0200
commit6e9557cd6c54c99f0d6d9c11096a2f38be47493a (patch)
tree9606f9ae65bfa5f8c69d5b1dc608ba01fe555600 /libass/ass_parse.c
parent29167f37cf188f0b4dc6003ff6e733388112d183 (diff)
downloadlibass-6e9557cd6c54c99f0d6d9c11096a2f38be47493a.tar.bz2
libass-6e9557cd6c54c99f0d6d9c11096a2f38be47493a.tar.xz
Basic @font support
Do not skip '@' at the start of a font name in styles; detect '@' at font name start and set a new attribute in ASS_Font accordingly. Rotate affected glyphs after loading and calculate a suitable advance.
Diffstat (limited to 'libass/ass_parse.c')
-rw-r--r--libass/ass_parse.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c
index e5d1b16..ac502e7 100644
--- a/libass/ass_parse.c
+++ b/libass/ass_parse.c
@@ -68,9 +68,15 @@ void update_font(ASS_Renderer *render_priv)
{
unsigned val;
ASS_FontDesc desc;
- desc.family = strdup(render_priv->state.family);
- desc.treat_family_as_pattern =
- render_priv->state.treat_family_as_pattern;
+ desc.treat_family_as_pattern = render_priv->state.treat_family_as_pattern;
+
+ if (render_priv->state.family[0] == '@') {
+ desc.vertical = 1;
+ desc.family = strdup(render_priv->state.family + 1);
+ } else {
+ desc.vertical = 0;
+ desc.family = strdup(render_priv->state.family);
+ }
val = render_priv->state.bold;
// 0 = normal, 1 = bold, >1 = exact weight