Code

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