34300
|
1 /*
|
|
2 * Copyright (C) 2011 Grigori Goronzy <greg@chown.ath.cx>
|
|
3 *
|
|
4 * This file is part of libass.
|
|
5 *
|
|
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.
|
|
9 *
|
|
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.
|
|
17 */
|
|
18
|
|
19 #ifndef LIBASS_SHAPER_H
|
|
20 #define LIBASS_SHAPER_H
|
|
21
|
|
22 #include "config.h"
|
|
23
|
34342
|
24 #ifdef CONFIG_FRIBIDI
|
34300
|
25 #include <fribidi/fribidi.h>
|
34342
|
26 #else
|
|
27 typedef int FriBidiParType;
|
|
28 typedef int FriBidiStrIndex;
|
|
29 #endif
|
34300
|
30 #include "ass_render.h"
|
|
31
|
|
32 void ass_shaper_info(ASS_Library *lib);
|
|
33 ASS_Shaper *ass_shaper_new(size_t prealloc);
|
|
34 void ass_shaper_free(ASS_Shaper *shaper);
|
|
35 void ass_shaper_set_kerning(ASS_Shaper *shaper, int kern);
|
|
36 void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv,
|
|
37 GlyphInfo *glyphs, size_t len);
|
|
38 void ass_shaper_set_base_direction(ASS_Shaper *shaper, FriBidiParType dir);
|
|
39 void ass_shaper_set_language(ASS_Shaper *shaper, const char *code);
|
|
40 void ass_shaper_set_level(ASS_Shaper *shaper, ASS_ShapingLevel level);
|
|
41 void ass_shaper_shape(ASS_Shaper *shaper, TextInfo *text_info);
|
|
42 void ass_shaper_cleanup(ASS_Shaper *shaper, TextInfo *text_info);
|
|
43 FriBidiStrIndex *ass_shaper_reorder(ASS_Shaper *shaper, TextInfo *text_info);
|
|
44 FriBidiParType resolve_base_direction(int font_encoding);
|
|
45
|
|
46 void ass_shaper_font_data_free(ASS_ShaperFontData *priv);
|
|
47
|
|
48 #endif
|