diff options
author | Grigori Goronzy <greg@blackbox> | 2011-06-20 23:12:22 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-06-20 23:20:25 +0200 |
commit | 1fdd4c0b394bc0ddd63129ede6fd87b8c3249712 (patch) | |
tree | eb3228e8d91171068555525c1fad4daf2e46d35e /libass/ass_drawing.h | |
parent | e5704aa76a2712782442156986f74b8766077ee1 (diff) | |
download | libass-1fdd4c0b394bc0ddd63129ede6fd87b8c3249712.tar.bz2 libass-1fdd4c0b394bc0ddd63129ede6fd87b8c3249712.tar.xz |
Use bare outlines for drawings
This finally gets rid of the nasty hack that manipulated a glyph
we somehow got from FreeType. Simplifies drawing handling a bit and
decouples drawing code from all font handling and related (fontconfig,
etc.) code.
Diffstat (limited to 'libass/ass_drawing.h')
-rw-r--r-- | libass/ass_drawing.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libass/ass_drawing.h b/libass/ass_drawing.h index f677fcd..b17d7e3 100644 --- a/libass/ass_drawing.h +++ b/libass/ass_drawing.h @@ -20,7 +20,7 @@ #define LIBASS_DRAWING_H #include <ft2build.h> -#include FT_GLYPH_H +#include FT_OUTLINE_H #include "ass.h" @@ -53,13 +53,12 @@ typedef struct { double scale_y; // FontScaleY int asc; // ascender int desc; // descender - FT_OutlineGlyph glyph; // the "fake" glyph created for later rendering + FT_Outline outline; // target outline + FT_Vector advance; // advance (from cbox) int hash; // hash value (for caching) // private FT_Library ftlibrary; // needed for font ops - ASS_Font *font; // dito - void *fontconfig_priv; // dito ASS_Library *library; int size; // current buffer size ASS_DrawingToken *tokens; // tokenized drawing @@ -70,11 +69,10 @@ typedef struct { FT_BBox cbox; // bounding box, or let's say... VSFilter's idea of it } ASS_Drawing; -ASS_Drawing *ass_drawing_new(void *fontconfig_priv, ASS_Font *font, - FT_Library lib); +ASS_Drawing *ass_drawing_new(ASS_Library *lib, FT_Library ftlib); void ass_drawing_free(ASS_Drawing* drawing); void ass_drawing_add_char(ASS_Drawing* drawing, char symbol); void ass_drawing_hash(ASS_Drawing* drawing); -FT_OutlineGlyph *ass_drawing_parse(ASS_Drawing *drawing, int raw_mode); +FT_Outline *ass_drawing_parse(ASS_Drawing *drawing, int raw_mode); #endif /* LIBASS_DRAWING_H */ |