Code

Use is_straight_curve() instead of three separate dynamic casts
[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 cairo_font_face_t* get_font_face();
36 cairo_status_t scaled_font_init (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *metrics);
37 cairo_status_t scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font, const char *utf8, cairo_glyph_t **glyphs, int *num_glyphs);
38 cairo_status_t scaled_font_render_glyph (cairo_scaled_font_t *scaled_font, unsigned long glyph, cairo_t *cr, cairo_text_extents_t *metrics);
40 private:
41 SPFont* font;
42 UserFont* userfont;
43 std::vector<SPGlyph*> glyphs;
44 SPMissingGlyph* missingglyph;
46 bool drawing_expose_cb (Gtk::Widget *widget, GdkEventExpose *event, gpointer data);
47 };
49 #endif //#ifndef NR_SVGFONTS_H_SEEN