]> granicus.if.org Git - libass/commitdiff
Fix caching of underlined/striked out glyphs
authorGrigori Goronzy <greg@blackbox>
Sat, 15 Aug 2009 01:03:10 +0000 (03:03 +0200)
committerGrigori Goronzy <greg@blackbox>
Sat, 15 Aug 2009 01:03:10 +0000 (03:03 +0200)
libass/ass_cache_template.h
libass/ass_render.c

index 19ab00ff30f728e83ebcc2622fba24153953e477..8d182ade9b4fa9aab5a58c16eb88eca323a92e3a 100644 (file)
@@ -54,7 +54,7 @@
 
 
 // describes a bitmap; bitmaps with equivalents structs are considered identical
-START(bitmap, bipmap_hash_key)
+START(bitmap, bitmap_hash_key)
     GENERIC(char, bitmap) // bool : true = bitmap, false = outline
     GENERIC(ASS_Font *, font)
     GENERIC(double, size) // font size
@@ -79,6 +79,7 @@ START(bitmap, bipmap_hash_key)
     FTVECTOR(advance) // subpixel shift vector
     FTVECTOR(shadow_offset) // shadow subpixel shift
     GENERIC(unsigned, drawing_hash) // hashcode of a drawing
+    GENERIC(unsigned, flags)    // glyph decoration
     GENERIC(unsigned, border_style)
 END(BitmapHashKey)
 
index f0800c3badddeee0e07bcf5ced9cbee2ce689c0e..15f568d92d5feb840008505de28de525147b94f3 100644 (file)
@@ -2750,6 +2750,8 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event,
                 render_priv->state.shadow_y * render_priv->border_scale -
                 (int) (render_priv->state.shadow_y *
                 render_priv->border_scale));
+        text_info->glyphs[text_info->length].hash_key.flags =
+            render_priv->state.flags;
 
         text_info->length++;