50 #include <fontconfig/fontconfig.h>
52 #include FT_FREETYPE_H
60 cairo_font_face_t *_cff;
64 cairo_font_slant_t _slant;
68 cairo_font_weight_t _weight;
75 Font( FcPattern *pat );
77 Font(
const std::string &family, cairo_font_slant_t
slant,
78 cairo_font_weight_t
weight );
85 std::string
family(
void )
const;
86 cairo_font_slant_t
slant(
void )
const;
87 cairo_font_weight_t
weight(
void )
const;
88 cairo_font_face_t *
font_face(
void )
const;
104 std::vector<Font> _search;
105 std::vector<Font> _loaded;
107 int get_font_matrix( cairo_t *cairo, cairo_matrix_t *matrix, cairo_matrix_t *orig_matrix );
108 int process_substr( cairo_t *cairo,
const std::string &str, cairo_text_extents_t *extents,
109 double x0,
double y0,
double &x,
double &y );
110 void process( cairo_t *cairo,
const std::string &str, cairo_text_extents_t *extents,
double &x,
double &y );
133 static void combine_extents( cairo_text_extents_t *extents1,
double x1,
double y1,
134 const cairo_text_extents_t *extents2,
double x2,
double y2 );
141 FcConfig *
fc(
void ) {
return( _fc ); }
149 std::string
family(
void )
const;
150 cairo_font_slant_t
slant(
void )
const;
151 cairo_font_weight_t
weight(
void )
const;
152 cairo_font_face_t *
font_face(
void )
const;
158 cairo_font_weight_t
weight );
162 void text_extents( cairo_t *cairo,
const std::string &str, cairo_text_extents_t *extents );
168 void draw_text( cairo_t *cairo,
const std::string &str,
double &x,
double &y );