1 #include "config.h"
2 #ifdef ENABLE_SVG_FONTS
3 #ifndef __SP_GLYPH_H__
4 #define __SP_GLYPH_H__
6 /*
7 * SVG <glyph> element implementation
8 *
9 * Authors:
10 * Felipe C. da S. Sanches <felipe.sanches@gmail.com>
11 *
12 * Copyright (C) 2008 Felipe C. da S. Sanches
13 *
14 * Released under GNU GPL, read the file 'COPYING' for more information
15 */
17 #include "sp-object.h"
19 #define SP_TYPE_GLYPH (sp_glyph_get_type ())
20 #define SP_GLYPH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_GLYPH, SPGlyph))
21 #define SP_GLYPH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_GLYPH, SPGlyphClass))
22 #define SP_IS_GLYPH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_GLYPH))
23 #define SP_IS_GLYPH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_GLYPH))
25 enum glyphArabicForm {
26 GLYPH_ARABIC_FORM_INITIAL,
27 GLYPH_ARABIC_FORM_MEDIAL,
28 GLYPH_ARABIC_FORM_TERMINAL,
29 GLYPH_ARABIC_FORM_ISOLATED,
30 };
32 enum glyphOrientation {
33 GLYPH_ORIENTATION_HORIZONTAL,
34 GLYPH_ORIENTATION_VERTICAL,
35 GLYPH_ORIENTATION_BOTH
36 };
38 struct SPGlyph : public SPObject {
39 char* unicode;
40 char* glyph_name;
41 char* d;
42 glyphOrientation orientation;
43 glyphArabicForm arabic_form;
44 char* lang;
45 double horiz_adv_x;
46 double vert_origin_x;
47 double vert_origin_y;
48 double vert_adv_y;
49 };
51 struct SPGlyphClass {
52 SPObjectClass parent_class;
53 };
55 GType sp_glyph_get_type (void);
57 #endif //#ifndef __SP_GLYPH_H__
58 #endif //#ifdef ENABLE_SVG_FONTS