Mercurial > mplayer.hg
diff libass/ass_font.h @ 34295:6e7f60f6f9d4
Update libass to 0.10 release.
Patch by [subjunk gmail com], see bug #2008.
author | reimar |
---|---|
date | Sat, 03 Dec 2011 21:35:56 +0000 |
parents | 88eebbbbd6a0 |
children |
line wrap: on
line diff
--- a/libass/ass_font.h Sat Dec 03 21:33:28 2011 +0000 +++ b/libass/ass_font.h Sat Dec 03 21:35:56 2011 +0000 @@ -22,13 +22,19 @@ #include <stdint.h> #include <ft2build.h> #include FT_GLYPH_H +#include FT_OUTLINE_H + #include "ass.h" #include "ass_types.h" +#define VERTICAL_LOWER_BOUND 0x02f1 + #define ASS_FONT_MAX_FACES 10 #define DECO_UNDERLINE 1 #define DECO_STRIKETHROUGH 2 +typedef struct ass_shaper_font_data ASS_ShaperFontData; + typedef struct { char *family; unsigned bold; @@ -42,25 +48,33 @@ ASS_Library *library; FT_Library ftlibrary; FT_Face faces[ASS_FONT_MAX_FACES]; + ASS_ShaperFontData *shaper_priv; int n_faces; double scale_x, scale_y; // current transform FT_Vector v; // current shift double size; } ASS_Font; -// FIXME: passing the hashmap via a void pointer is very ugly. -ASS_Font *ass_font_new(void *font_cache, ASS_Library *library, +#include "ass_cache.h" + +ASS_Font *ass_font_new(Cache *font_cache, ASS_Library *library, FT_Library ftlibrary, void *fc_priv, ASS_FontDesc *desc); void ass_font_set_transform(ASS_Font *font, double scale_x, double scale_y, FT_Vector *v); +void ass_face_set_size(FT_Face face, double size); void ass_font_set_size(ASS_Font *font, double size); void ass_font_get_asc_desc(ASS_Font *font, uint32_t ch, int *asc, int *desc); +int ass_font_get_index(void *fcpriv, ASS_Font *font, uint32_t symbol, + int *face_index, int *glyph_index); FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font, - uint32_t ch, ASS_Hinting hinting, int flags); + uint32_t ch, int face_index, int index, + ASS_Hinting hinting, int deco); FT_Vector ass_font_get_kerning(ASS_Font *font, uint32_t c1, uint32_t c2); void ass_font_free(ASS_Font *font); -void fix_freetype_stroker(FT_OutlineGlyph glyph, int border_x, int border_y); +void fix_freetype_stroker(FT_Outline *outline, int border_x, int border_y); +void outline_copy(FT_Library lib, FT_Outline *source, FT_Outline **dest); +void outline_free(FT_Library lib, FT_Outline *outline); #endif /* LIBASS_FONT_H */