summaryrefslogtreecommitdiffstats
path: root/libass/ass_cache.h
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-20 23:04:21 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-20 23:04:21 +0000
commit5b0e4436fc4416115aeb36a675314d4fd3925e1d (patch)
tree4d2a7cbb326ce5d0c088eb2a137cffc2aa4fc86e /libass/ass_cache.h
parent6c412d239ba1c2dc2484dc49392ab50cc6b2d3fb (diff)
downloadmpv-5b0e4436fc4416115aeb36a675314d4fd3925e1d.tar.bz2
mpv-5b0e4436fc4416115aeb36a675314d4fd3925e1d.tar.xz
Add outline glyph cache (unused yet).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23036 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_cache.h')
-rw-r--r--libass/ass_cache.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h
index 67fac337ec..f4bd60524e 100644
--- a/libass/ass_cache.h
+++ b/libass/ass_cache.h
@@ -57,6 +57,28 @@ bitmap_hash_val_t* cache_find_bitmap(bitmap_hash_key_t* key);
void ass_bitmap_cache_reset(void);
void ass_bitmap_cache_done(void);
+// describes an outline glyph
+typedef struct glyph_hash_key_s {
+ ass_font_t* font;
+ int size; // font size
+ uint32_t ch; // character code
+ int bold, italic;
+ unsigned scale_x, scale_y; // 16.16
+ FT_Vector advance; // subpixel shift vector
+} glyph_hash_key_t;
+
+typedef struct glyph_hash_val_s {
+ FT_Glyph glyph;
+ FT_BBox bbox_scaled; // bbox after scaling, but before rotation
+ FT_Vector advance; // 26.6, advance distance to the next bitmap in line
+} glyph_hash_val_t;
+
+void ass_glyph_cache_init(void);
+void cache_add_glyph(glyph_hash_key_t* key, glyph_hash_val_t* val);
+glyph_hash_val_t* cache_find_glyph(glyph_hash_key_t* key);
+void ass_glyph_cache_reset(void);
+void ass_glyph_cache_done(void);
+
typedef struct hashmap_s hashmap_t;
typedef void (*hashmap_item_dtor_t)(void* key, size_t key_size, void* value, size_t value_size);
typedef int (*hashmap_key_compare_t)(void* key1, void* key2, size_t key_size);