6054
by JucaBlues
adding ifdef HAVE_CONFIG_H |
1 |
#ifdef HAVE_CONFIG_H
|
2 |
# include <config.h>
|
|
3 |
#endif
|
|
4 |
||
5753
by JucaBlues
* add rule in configure.ac so that only who has cairo > 1.6.4 (currently cairo git master branch) will compile SVGFonts (experimental) support. |
5 |
#ifdef ENABLE_SVG_FONTS
|
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
6 |
#ifndef __SP_GLYPH_KERNING_H__
|
7 |
#define __SP_GLYPH_KERNING_H__
|
|
8 |
||
9 |
/*
|
|
10 |
* SVG <hkern> and <vkern> elements implementation
|
|
11 |
*
|
|
12 |
* Authors:
|
|
8889
by Felipe C. da S. Sanches
updating my email address in file headers |
13 |
* Felipe C. da S. Sanches <juca@members.fsf.org>
|
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
14 |
*
|
15 |
* Copyright (C) 2008 Felipe C. da S. Sanches
|
|
16 |
*
|
|
17 |
* Released under GNU GPL, read the file 'COPYING' for more information
|
|
18 |
*/
|
|
19 |
||
20 |
#include "sp-object.h" |
|
5949
by JucaBlues
UnicodeRange class implementation. |
21 |
#include "unicoderange.h" |
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
22 |
|
5628
by JucaBlues
distinguish between hkern and vkern tags |
23 |
#define SP_TYPE_HKERN (sp_glyph_kerning_h_get_type ())
|
24 |
#define SP_HKERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_HKERN, SPHkern))
|
|
25 |
#define SP_HKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_HKERN, SPGlyphKerningClass))
|
|
26 |
#define SP_IS_HKERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_HKERN))
|
|
27 |
#define SP_IS_HKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_HKERN))
|
|
28 |
||
29 |
#define SP_TYPE_VKERN (sp_glyph_kerning_v_get_type ())
|
|
30 |
#define SP_VKERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_VKERN, SPVkern))
|
|
31 |
#define SP_VKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_VKERN, SPGlyphKerningClass))
|
|
32 |
#define SP_IS_VKERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_VKERN))
|
|
33 |
#define SP_IS_VKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_VKERN))
|
|
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
34 |
|
6026
by JucaBlues
implement kerning by glyph-name, g1 and g2 attributes |
35 |
class GlyphNames{ |
36 |
public: |
|
37 |
GlyphNames(const gchar* value); |
|
38 |
~GlyphNames(); |
|
7029
by JucaBlues
Now users can design a font within inkscape, save it and then open the |
39 |
bool contains(const char* name); |
6026
by JucaBlues
implement kerning by glyph-name, g1 and g2 attributes |
40 |
private: |
41 |
gchar* names; |
|
42 |
};
|
|
43 |
||
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
44 |
struct SPGlyphKerning : public SPObject { |
5949
by JucaBlues
UnicodeRange class implementation. |
45 |
UnicodeRange* u1; |
6026
by JucaBlues
implement kerning by glyph-name, g1 and g2 attributes |
46 |
GlyphNames* g1; |
5949
by JucaBlues
UnicodeRange class implementation. |
47 |
UnicodeRange* u2; |
6026
by JucaBlues
implement kerning by glyph-name, g1 and g2 attributes |
48 |
GlyphNames* g2; |
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
49 |
double k; |
50 |
};
|
|
51 |
||
5628
by JucaBlues
distinguish between hkern and vkern tags |
52 |
struct SPHkern : public SPGlyphKerning {}; |
53 |
struct SPVkern : public SPGlyphKerning {}; |
|
54 |
||
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
55 |
struct SPGlyphKerningClass { |
56 |
SPObjectClass parent_class; |
|
57 |
};
|
|
58 |
||
5628
by JucaBlues
distinguish between hkern and vkern tags |
59 |
GType sp_glyph_kerning_h_get_type (void); |
60 |
GType sp_glyph_kerning_v_get_type (void); |
|
5624
by JucaBlues
Starting Summer of Code: SVG Fonts |
61 |
|
62 |
#endif //#ifndef __SP_GLYPH_KERNING_H__ |
|
5753
by JucaBlues
* add rule in configure.ac so that only who has cairo > 1.6.4 (currently cairo git master branch) will compile SVGFonts (experimental) support. |
63 |
#endif //#ifdef ENABLE_SVG_FONTS |