Code

Connector tool: make connectors avoid the convex hull of shapes.
[inkscape.git] / src / display / nr-svgfonts.h
1 #include "config.h"
2 #ifndef NR_SVGFONTS_H_SEEN
3 #define NR_SVGFONTS_H_SEEN
4 /*
5  * SVGFonts rendering headear
6  *
7  * Authors:
8  *    Felipe C. da S. Sanches <felipe.sanches@gmail.com>
9  *
10  * Copyright (C) 2008 Felipe C. da S. Sanches
11  *
12  * Released under GNU GPL version 2 or later.
13  * Read the file 'COPYING' for more information.
14  */
16 #include "cairo.h"
17 #include <gtkmm/widget.h>
18 #include "../sp-glyph.h"
19 #include "../sp-missing-glyph.h"
20 #include "../sp-font.h"
21 #include "../sp-glyph-kerning.h"
23 class SvgFont;
24 struct SPFont;
26 class UserFont{
27 public:
28 UserFont(SvgFont* instance);
29 cairo_font_face_t* face;
30 };
32 class SvgFont{
33 public:
34 SvgFont(SPFont* spfont);
35 void refresh();
36 cairo_font_face_t* get_font_face();
37 cairo_status_t scaled_font_init (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *metrics);
38 cairo_status_t scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font, const char *utf8, int utf8_len, cairo_glyph_t **glyphs, int *num_glyphs, cairo_text_cluster_t **clusters, int *num_clusters, cairo_text_cluster_flags_t *flags);
39 cairo_status_t scaled_font_render_glyph (cairo_scaled_font_t *scaled_font, unsigned long glyph, cairo_t *cr, cairo_text_extents_t *metrics);
41 private:
42 SPFont* font;
43 UserFont* userfont;
44 std::vector<SPGlyph*> glyphs;
45 SPMissingGlyph* missingglyph;
47 bool drawing_expose_cb (Gtk::Widget *widget, GdkEventExpose *event, gpointer data);
48 };
50 #endif //#ifndef NR_SVGFONTS_H_SEEN