1 #ifndef __SP_FONTFACE_H__
2 #define __SP_FONTFACE_H__
4 /*
5 * SVG <font-face> element implementation
6 *
7 * Section 20.8.3 of the W3C SVG 1.1 spec
8 * available at:
9 * http://www.w3.org/TR/SVG/fonts.html#FontFaceElement
10 *
11 * Authors:
12 * Felipe C. da S. Sanches <felipe.sanches@gmail.com>
13 *
14 * Copyright (C) 2008 Felipe C. da S. Sanches
15 *
16 * Released under GNU GPL, read the file 'COPYING' for more information
17 */
19 #include "sp-object.h"
21 #define SP_TYPE_FONTFACE (sp_fontface_get_type ())
22 #define SP_FONTFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_FONTFACE, SPFontFace))
23 #define SP_FONTFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_FONTFACE, SPFontFaceClass))
24 #define SP_IS_FONTFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_FONTFACE))
25 #define SP_IS_FONTFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_FONTFACE))
27 enum FontFaceStyleType{
28 SP_FONTFACE_STYLE_ALL,
29 SP_FONTFACE_STYLE_NORMAL,
30 SP_FONTFACE_STYLE_ITALIC,
31 SP_FONTFACE_STYLE_OBLIQUE
32 };
34 enum FontFaceVariantType{
35 SP_FONTFACE_VARIANT_NORMAL,
36 SP_FONTFACE_VARIANT_SMALL_CAPS
37 };
39 enum FontFaceWeightType{
40 SP_FONTFACE_WEIGHT_ALL,
41 SP_FONTFACE_WEIGHT_NORMAL,
42 SP_FONTFACE_WEIGHT_BOLD,
43 SP_FONTFACE_WEIGHT_100,
44 SP_FONTFACE_WEIGHT_200,
45 SP_FONTFACE_WEIGHT_300,
46 SP_FONTFACE_WEIGHT_400,
47 SP_FONTFACE_WEIGHT_500,
48 SP_FONTFACE_WEIGHT_600,
49 SP_FONTFACE_WEIGHT_700,
50 SP_FONTFACE_WEIGHT_800,
51 SP_FONTFACE_WEIGHT_900
52 };
54 enum FontFaceStretchType{
55 SP_FONTFACE_STRETCH_ALL,
56 SP_FONTFACE_STRETCH_NORMAL,
57 SP_FONTFACE_STRETCH_ULTRA_CONDENSED,
58 SP_FONTFACE_STRETCH_EXTRA_CONDENSED,
59 SP_FONTFACE_STRETCH_CONDENSED,
60 SP_FONTFACE_STRETCH_SEMI_CONDENSED,
61 SP_FONTFACE_STRETCH_SEMI_EXPANDED,
62 SP_FONTFACE_STRETCH_EXPANDED,
63 SP_FONTFACE_STRETCH_EXTRA_EXPANDED,
64 SP_FONTFACE_STRETCH_ULTRA_EXPANDED
65 };
67 enum FontFaceUnicodeRangeType{
68 FONTFACE_UNICODERANGE_FIXME_HERE,
69 };
71 struct SPFontFace : public SPObject {
72 char* font_family;
73 std::vector<FontFaceStyleType> font_style;
74 std::vector<FontFaceVariantType> font_variant;
75 std::vector<FontFaceWeightType> font_weight;
76 std::vector<FontFaceStretchType> font_stretch;
77 char* font_size;
78 std::vector<FontFaceUnicodeRangeType> unicode_range;
79 double units_per_em;
80 std::vector<int> panose_1;
81 double stemv;
82 double stemh;
83 double slope;
84 double cap_height;
85 double x_height;
86 double accent_height;
87 double ascent;
88 double descent;
89 char* widths;
90 char* bbox;
91 double ideographic;
92 double alphabetic;
93 double mathematical;
94 double hanging;
95 double v_ideographic;
96 double v_alphabetic;
97 double v_mathematical;
98 double v_hanging;
99 double underline_position;
100 double underline_thickness;
101 double strikethrough_position;
102 double strikethrough_thickness;
103 double overline_position;
104 double overline_thickness;
105 };
107 struct SPFontFaceClass {
108 SPObjectClass parent_class;
109 };
111 GType sp_fontface_get_type (void);
113 #endif //#ifndef __SP_FONTFACE_H__