2 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
4 * This file is part of libass.
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27 typedef struct ass_font ASS_Font;
28 typedef struct ass_font_desc ASS_FontDesc;
31 #include "ass_types.h"
32 #include "ass_fontselect.h"
33 #include "ass_cache.h"
35 #define VERTICAL_LOWER_BOUND 0x02f1
37 #define ASS_FONT_MAX_FACES 10
38 #define DECO_UNDERLINE 1
39 #define DECO_STRIKETHROUGH 2
42 struct ass_font_desc {
46 int vertical; // @font vertical layout
53 int faces_uid[ASS_FONT_MAX_FACES];
54 FT_Face faces[ASS_FONT_MAX_FACES];
55 ASS_ShaperFontData *shaper_priv;
60 void charmap_magic(ASS_Library *library, FT_Face face);
61 ASS_Font *ass_font_new(ASS_Renderer *render_priv, ASS_FontDesc *desc);
62 void ass_face_set_size(FT_Face face, double size);
63 void ass_font_set_size(ASS_Font *font, double size);
64 void ass_font_get_asc_desc(ASS_Font *font, int face_index,
66 int ass_font_get_index(ASS_FontSelector *fontsel, ASS_Font *font,
67 uint32_t symbol, int *face_index, int *glyph_index);
68 uint32_t ass_font_index_magic(FT_Face face, uint32_t symbol);
69 FT_Glyph ass_font_get_glyph(ASS_Font *font, int face_index, int index,
70 ASS_Hinting hinting, int deco);
71 void ass_font_clear(ASS_Font *font);
73 #endif /* LIBASS_FONT_H */