13
13
#include <libnrtype/font-style.h>
14
14
#include <livarot/livarot-forward.h>
15
15
#include "libnr/nr-rect.h"
17
18
// the font_instance are the template of several raster_font; they provide metrics and outlines
18
19
// that are drawn by the raster_font, so the raster_font needs info relative to the way the
70
71
Path* Outline(int glyph_id, Path *copyInto=NULL);
71
72
// queries the outline of the glyph (in livarot Path form), and copies it into copyInto instead
72
73
// of allocating a new Path if copyInto != NULL
73
void* ArtBPath(int glyph_id);
74
// returns the artbpath for this glyph. no refcounting needed, it's deallocated when the
74
Geom::PathVector* PathVector(int glyph_id);
75
// returns the 2geom-type pathvector for this glyph. no refcounting needed, it's deallocated when the font_instance dies
76
76
double Advance(int glyph_id, bool vertical);
77
77
// nominal advance of the font.
78
78
bool FontMetrics(double &ascent, double &descent, double &leading);
79
79
bool FontSlope(double &run, double &rise);
80
80
// for generating slanted cursors for oblique fonts
81
NR::Maybe<NR::Rect> BBox(int glyph_id);
81
Geom::OptRect BBox(int glyph_id);
83
83
// creates a rasterfont for the given style
84
raster_font* RasterFont(NR::Matrix const &trs, double stroke_width,
84
raster_font* RasterFont(Geom::Matrix const &trs, double stroke_width,
85
85
bool vertical = false, JoinType stroke_join = join_straight,
86
86
ButtType stroke_cap = butt_straight, float miter_limit = 4.0);
87
87
// the dashes array in iStyle is copied