get rid of debugger bits
[swfdec.git] / libswfdec / swfdec_font.h
blob1ff7d469dc2666acfe37d99283b8ee121da0f554
1 /* Swfdec
2 * Copyright (C) 2003-2006 David Schleef <ds@schleef.org>
3 * 2005-2006 Eric Anholt <eric@anholt.net>
4 * 2006-2007 Benjamin Otte <otte@gnome.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef _SWFDEC_FONT_H_
23 #define _SWFDEC_FONT_H_
25 #include <pango/pangocairo.h>
26 #include <libswfdec/swfdec_types.h>
27 #include <libswfdec/swfdec_character.h>
29 G_BEGIN_DECLS
30 //typedef struct _SwfdecFont SwfdecFont;
31 typedef struct _SwfdecFontEntry SwfdecFontEntry;
32 typedef struct _SwfdecFontClass SwfdecFontClass;
34 #define SWFDEC_TEXT_SCALE_FACTOR (1024)
36 typedef enum {
37 SWFDEC_LANGUAGE_NONE = 0,
38 SWFDEC_LANGUAGE_LATIN = 1,
39 SWFDEC_LANGUAGE_JAPANESE = 2,
40 SWFDEC_LANGUAGE_KOREAN = 3,
41 SWFDEC_LANGUAGE_CHINESE = 4,
42 SWFDEC_LANGUAGE_CHINESE_TRADITIONAL = 5
43 } SwfdecLanguage;
45 #define SWFDEC_TYPE_FONT (swfdec_font_get_type())
46 #define SWFDEC_IS_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_FONT))
47 #define SWFDEC_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_FONT))
48 #define SWFDEC_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_FONT, SwfdecFont))
49 #define SWFDEC_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_FONT, SwfdecFontClass))
51 struct _SwfdecFontEntry {
52 SwfdecShape * shape; /* shape to use as fallback */
53 gunichar value; /* UCS2 value of glyph */
56 struct _SwfdecFont
58 SwfdecCharacter character;
60 char * name; /* name of the font (FIXME: what name?) */
61 PangoFontDescription *desc;
62 gboolean bold; /* font is bold */
63 gboolean italic; /* font is italic */
64 gboolean small; /* font is rendered at small sizes */
65 GArray * glyphs; /* SwfdecFontEntry */
66 guint scale_factor; /* size of a font in glyph entry */
69 struct _SwfdecFontClass
71 SwfdecCharacterClass character_class;
74 GType swfdec_font_get_type (void);
76 SwfdecShape * swfdec_font_get_glyph (SwfdecFont * font,
77 guint glyph);
79 int tag_func_define_font_info (SwfdecSwfDecoder * s,
80 guint tag);
81 int tag_func_define_font (SwfdecSwfDecoder * s,
82 guint tag);
83 int tag_func_define_font_2 (SwfdecSwfDecoder * s,
84 guint tag);
85 int tag_func_define_font_3 (SwfdecSwfDecoder * s,
86 guint tag);
88 G_END_DECLS
89 #endif