From 1a3b6eef302a2fed759b8c278592c4dd371044fb Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sat, 15 Aug 2009 03:03:10 +0200 Subject: Fix caching of underlined/striked out glyphs --- libass/ass_cache_template.h | 3 ++- libass/ass_render.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libass/ass_cache_template.h b/libass/ass_cache_template.h index 19ab00f..8d182ad 100644 --- a/libass/ass_cache_template.h +++ b/libass/ass_cache_template.h @@ -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) diff --git a/libass/ass_render.c b/libass/ass_render.c index f0800c3..15f568d 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -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++; -- cgit v1.2.3