Hershey Vector Fonts 0.1.0
A C++ library for working with the Hershey vector fonts
|
Go to the source code of this file.
Macros | |
#define | A4_P_WIDTH 595.275590551 |
#define | A4_P_HEIGHT 841.88976378 |
#define | A5_P_WIDTH 420.94488189 |
#define | A5_P_HEIGHT 595.275590551 |
Functions | |
void | draw_glyph (cairo_t *cr, Hershey::Glyph glyph, int x0, int y0, int scale) |
Draw a glyph. | |
void | draw_glyphs (cairo_t *cr, Hershey::String string, int x0, int y0, int scale) |
Draw a string of glyphs. | |
void | draw_font (cairo_t *cr, Hershey::Font font, int width, int height) |
Draw the glyphs in a font. | |
float | position (float fraction, float x, float X) |
Calculate a fractional position. | |
This header file contains the declaration of the functions for the Cairo interface.
void draw_font | ( | cairo_t * | cr, |
Hershey::Font | font, | ||
int | width, | ||
int | height | ||
) |
Draw the glyphs in a font.
cr | The Cairo context |
font | The font to draw |
void draw_glyph | ( | cairo_t * | cr, |
Hershey::Glyph | glyph, | ||
int | x0, | ||
int | y0, | ||
int | scale | ||
) |
Draw a glyph.
cr | The Cairo context |
glyph | The glyph to draw |
x0 | The starting x position |
y0 | The starting x position |
scale | The amount to scale the glyph by |
void draw_glyphs | ( | cairo_t * | cr, |
Hershey::String | string, | ||
int | x0, | ||
int | y0, | ||
int | scale | ||
) |
Draw a string of glyphs.
cr | The Cairo context |
glyph | The string of glyphs to draw |
x0 | The starting x position |
y0 | The starting x position |
scale | The amount to scale the glyphs by |
float position | ( | float | fraction, |
float | x, | ||
float | X | ||
) |
Calculate a fractional position.
fraction | The fraction to use |
x | The object's size |
X | The total size |