diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/annotated.html b/annotated.html new file mode 100644 index 0000000..a2b4984 --- /dev/null +++ b/annotated.html @@ -0,0 +1,85 @@ + + +
+ + + + +
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
▼NHershey | |
CFont | A Hershey vector font |
CFontFamily | A Hershey vector font family |
CGlyph | A Hershey vector font glyph |
CString | A character string comprising Hershey vector font glyphs |
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A Hershey vector font. + More...
+ +#include <font.hpp>
+Public Member Functions | |
+ | Font () |
Create a new font. | |
Font (std::string name) | |
Create a new font. | |
+std::string | get_fname () |
Get the font's filename. | |
+std::string | get_name () |
Get the font's name. | |
+int | get_num_glyphs () |
Get the number of glyphs in the font. | |
Glyph | get_glyph (int i) |
Get the i'th glyph in the font. | |
Glyph | get_glyph (char c) |
Get the glyph corresponding to character c. | |
A Hershey vector font.
+Font::Font | +( | +std::string | name | ) | ++ |
Create a new font.
+name | The name of the font to create. |
Glyph Font::get_glyph | +( | +char | c | ) | ++ |
Get the glyph corresponding to character c.
+c | The character to get the glyph of. |
Glyph Font::get_glyph | +( | +int | i | ) | ++ |
Get the i'th glyph in the font.
+i | The index of the glyph to get. |
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A Hershey vector font family. + More...
+ +#include <fontfamily.hpp>
+Public Member Functions | |
FontFamily (std::string name, bool rm, bool it, bool sc, bool gr) | |
Create a new font family. | |
Font | get_font (std::string font) |
Get a font. | |
A Hershey vector font family.
+FontFamily::FontFamily | +( | +std::string | name, | +
+ | + | bool | rm, | +
+ | + | bool | it, | +
+ | + | bool | sc, | +
+ | + | bool | gr ) | +
Create a new font family.
+name | The name of the font family. |
rm | Whether the family contains a roman font. |
it | Whether the family contains a italic font. |
sc | Whether the family contains a script font. |
gr | Whether the family contains a Greek font. |
Font FontFamily::get_font | +( | +std::string | font | ) | ++ |
Get a font.
+The | font to get. |
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A Hershey vector font glyph. + More...
+ +#include <glyph.hpp>
+Public Member Functions | |
Glyph () | |
Create a new glyph. | |
Glyph (std::string raw) | |
Create a new glyph from a raw coordinate definition. | |
+std::string | get_raw () |
Get the raw coordinate definition of the glyph. | |
+int | get_cid () |
Get the character's unique identifier. | |
+int | get_lhp () |
Get the character's left-hand position. | |
+int | get_rhp () |
Get the character's right-hand position. | |
+int | get_nvert () |
Get the number of vertices making up the character. | |
+void | print_info () |
Print information about the character. | |
+void | print_coords () |
Print the character's vertices' coordinates in numpy array format. | |
+void | print_coords_nparray () |
Print the character's vertices' coordinates in numpy array format. | |
+int | get_width () |
Get the character's width. | |
+int | get_height () |
Get the character's height. | |
+Data Fields | |
int | coords [144][2] |
A Hershey vector font glyph.
+Glyph::Glyph | +( | +) | ++ |
Create a new glyph.
+The x and y coordinates of the character's vertices.
+ +Glyph::Glyph | +( | +std::string | raw | ) | ++ |
Create a new glyph from a raw coordinate definition.
+raw | The raw coordinate definition of the glyph. |
int Glyph::coords[144][2] | +
The width of the character.
+ +
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A Hershey vector font. + More...
+ +#include <font.hpp>
+Public Member Functions | |
+ | Font () |
Create a new font. | |
Font (std::string name) | |
Create a new font. More... | |
std::string | get_fname () |
Get the font's filename. More... | |
std::string | get_name () |
Get the font's name. More... | |
int | get_num_glyphs () |
Get the number of glyphs in the font. More... | |
Glyph | get_glyph (int i) |
Get the i'th glyph in the font. More... | |
Glyph | get_glyph (char c) |
Get the glyph corresponding to character c. More... | |
A Hershey vector font.
+Font::Font | +( | +std::string | +name | ) | ++ |
Create a new font.
+name | The name of the font to create. |
std::string Font::get_fname | +( | +) | ++ |
Get the font's filename.
+The | name of the file containing the font's raw glyph definitions. |
Glyph Font::get_glyph | +( | +char | +c | ) | ++ |
Get the glyph corresponding to character c.
+c | The character to get the glyph of. |
The | glyph of character c. |
Glyph Font::get_glyph | +( | +int | +i | ) | ++ |
Get the i'th glyph in the font.
+i | The index of the glyph to get. |
The | glyph at index i in the font. |
std::string Font::get_name | +( | +) | ++ |
Get the font's name.
+The | name of the font. |
int Font::get_num_glyphs | +( | +) | ++ |
Get the number of glyphs in the font.
+The | number of glyphs in the font. |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A Hershey vector font family. + More...
+ +#include <fontfamily.hpp>
+Public Member Functions | |
FontFamily (std::string name, bool rm, bool it, bool sc, bool gr) | |
Create a new font family. More... | |
Font | get_font (std::string font) |
Get a font. More... | |
A Hershey vector font family.
+FontFamily::FontFamily | +( | +std::string | +name, | +
+ | + | bool | +rm, | +
+ | + | bool | +it, | +
+ | + | bool | +sc, | +
+ | + | bool | +gr | +
+ | ) | ++ |
Create a new font family.
+name | The name of the font family. |
rm | Whether the family contains a roman font. |
it | Whether the family contains a italic font. |
sc | Whether the family contains a script font. |
gr | Whether the family contains a Greek font. |
Font FontFamily::get_font | +( | +std::string | +font | ) | ++ |
Get a font.
+font | The font to get. |
The | requested font. |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A Hershey vector font glyph. + More...
+ +#include <glyph.hpp>
+Public Member Functions | |
Glyph () | |
Create a new glyph. More... | |
Glyph (std::string raw) | |
Create a new glyph from a raw coordinate definition. More... | |
std::string | get_raw () |
Get the raw coordinate definition of the glyph. More... | |
int | get_cid () |
Get the character's unique identifier. More... | |
int | get_lhp () |
Get the character's left-hand position. More... | |
int | get_rhp () |
Get the character's right-hand position. More... | |
int | get_nvert () |
Get the number of vertices making up the character. More... | |
+void | print_info () |
Print information about the character. | |
+void | print_coords () |
Print the character's vertices' coordinates in numpy array format. | |
+void | print_coords_nparray () |
Print the character's vertices' coordinates in numpy array format. | |
int | get_width () |
Get the character's width. More... | |
int | get_height () |
Get the character's height. More... | |
+Data Fields | |
int | coords [144][2] |
A Hershey vector font glyph.
+Glyph::Glyph | +( | +) | ++ |
Create a new glyph.
+The x and y coordinates of the character's vertices.
+ +Glyph::Glyph | +( | +std::string | +raw | ) | ++ |
Create a new glyph from a raw coordinate definition.
+raw | The raw coordinate definition of the glyph. |
int Glyph::get_cid | +( | +) | ++ |
Get the character's unique identifier.
+The | character's unique identifier. |
int Glyph::get_height | +( | +) | ++ |
Get the character's height.
+The | height of the character. |
int Glyph::get_lhp | +( | +) | ++ |
Get the character's left-hand position.
+The | character's left-hand position. |
int Glyph::get_nvert | +( | +) | ++ |
Get the number of vertices making up the character.
+The | number of vertices making up the character. |
std::string Glyph::get_raw | +( | +) | ++ |
Get the raw coordinate definition of the glyph.
+The | raw coordinate definition of the glyph. |
int Glyph::get_rhp | +( | +) | ++ |
Get the character's right-hand position.
+The | character's right-hand position. |
int Glyph::get_width | +( | +) | ++ |
Get the character's width.
+The | width of the character. |
int Hershey::Glyph::coords[144][2] | +
The width of the character.
+ +
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A character string comprising Hershey vector font glyphs. + More...
+ +#include <string.hpp>
+Public Member Functions | |
String (Font font, const char *chars) | |
Create a new string of a given font. More... | |
int | get_nglyph () |
Get the number of glyphs in the string. More... | |
Glyph | get_glyph (int i) |
Get a i'th glyph in the string. More... | |
int | get_width () |
Get the width of the string. More... | |
int | get_height () |
Get the height of the string. More... | |
A character string comprising Hershey vector font glyphs.
+String::String | +( | +Font | +font, | +
+ | + | const char * | +chars | +
+ | ) | ++ |
Create a new string of a given font.
+The glyphs in the string.
+font | The name of the font to use. |
chars | The characters comprising the string. |
Glyph String::get_glyph | +( | +int | +i | ) | ++ |
Get a i'th glyph in the string.
+i | The index of the glyph to get. |
The | glyph at position i in the string. |
int String::get_height | +( | +) | ++ |
Get the height of the string.
+The | height of the string. |
int String::get_nglyph | +( | +) | ++ |
Get the number of glyphs in the string.
+The | number of glyphs in the string. |
int String::get_width | +( | +) | ++ |
Get the width of the string.
+The | width of the string. |
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+Public Member Functions | |
+ | Simplex (std::string chars) |
+ | Simplex (std::string style, std::string chars) |
+std::string | get_fname (int i) |
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A character string comprising Hershey vector font glyphs. + More...
+ +#include <string.hpp>
+Public Member Functions | |
String (Font font, const char *chars) | |
Create a new string of a given font. | |
+int | get_nglyph () |
Get the number of glyphs in the string. | |
Glyph | get_glyph (int i) |
Get a i'th glyph in the string. | |
+int | get_width () |
Get the width of the string. | |
+int | get_height () |
Get the height of the string. | |
A character string comprising Hershey vector font glyphs.
+String::String | +( | +Font | font, | +
+ | + | const char * | chars ) | +
Create a new string of a given font.
+The glyphs in the string.
+font | The name of the font to use. |
chars | The characters comprising the string. |
Glyph String::get_glyph | +( | +int | i | ) | ++ |
Get a i'th glyph in the string.
+i | The index of the glyph to get. |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+Files | |
file | font.hpp [code] |
file | fontfamily.hpp [code] |
file | glyph.hpp [code] |
file | hershey.hpp [code] |
file | hershey_cairo.hpp [code] |
file | hershey_xlib.hpp [code] |
file | string.hpp [code] |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
▼ include | |
font.hpp | |
fontfamily.hpp | |
glyph.hpp | |
hershey.hpp | |
hershey_cairo.hpp | |
hershey_xlib.hpp | |
string.hpp |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
Go to the source code of this file.
++Data Structures | |
class | Hershey::Font |
A Hershey vector font. More... | |
This header file contains the declaration of the Font class.
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
#include <fstream>
#include <iostream>
#include <string>
#include <unordered_map>
#include "font.hpp"
#include "glyph.hpp"
Go to the source code of this file.
++Data Structures | |
class | Hershey::FontFamily |
A Hershey vector font family. More... | |
This header file contains the declaration of the FontFamily class.
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
#include <array>
#include <fstream>
#include <iostream>
#include <string>
Go to the source code of this file.
++Data Structures | |
class | Hershey::Glyph |
A Hershey vector font glyph. More... | |
This header file contains the declaration of the Glyph class.
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
Go to the source code of this file.
+This header file contains the declaration of the Hershey vector font header files.
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ 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. More... | |
void | draw_glyphs (cairo_t *cr, Hershey::String string, int x0, int y0, int scale) |
Draw a string of glyphs. More... | |
void | draw_font (cairo_t *cr, Hershey::Font font, int width, int height) |
Draw the glyphs in a font. More... | |
float | position (float fraction, float x, float X) |
Calculate a fractional position. More... | |
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 |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "font.hpp"
#include "glyph.hpp"
#include "string.hpp"
Go to the source code of this file.
++Functions | |
void | draw_glyph (Display *display, Window *win, GC *gc, Hershey::Glyph glyph, int x0, int y0, int scale) |
Draw a glyph. More... | |
void | draw_glyphs (Display *display, Window *win, GC *gc, Hershey::String string, int x0, int y0, int scale) |
Draw a string of glyphs. More... | |
void | draw_font (Display *display, Window *win, GC *gc, Hershey::Font font, int width, int height) |
Draw the glyphs in a font. More... | |
float | position (float fraction, float x, float X) |
Calculate a fractional position. More... | |
This header file contains the declaration of the functions for the XLib interface.
+void draw_font | +( | +Display * | +display, | +
+ | + | Window * | +win, | +
+ | + | GC * | +gc, | +
+ | + | Hershey::Font | +font, | +
+ | + | int | +width, | +
+ | + | int | +height | +
+ | ) | ++ |
Draw the glyphs in a font.
+display | The display |
win | The window |
gc | The graphics context |
font | The font |
void draw_glyph | +( | +Display * | +display, | +
+ | + | Window * | +win, | +
+ | + | GC * | +gc, | +
+ | + | Hershey::Glyph | +glyph, | +
+ | + | int | +x0, | +
+ | + | int | +y0, | +
+ | + | int | +scale | +
+ | ) | ++ |
Draw a glyph.
+display | The display |
win | The window |
gc | The graphics context |
x0 | The starting x position |
y0 | The starting x position |
scale | The amount to scale the glyph by |
void draw_glyphs | +( | +Display * | +display, | +
+ | + | Window * | +win, | +
+ | + | GC * | +gc, | +
+ | + | Hershey::String | +string, | +
+ | + | int | +x0, | +
+ | + | int | +y0, | +
+ | + | int | +scale | +
+ | ) | ++ |
Draw a string of glyphs.
+display | The display |
win | The window |
gc | The graphics 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 |
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
+ Hershey Vector Fonts
+ 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+
A C++ library for working with the Hershey vector fonts.
+This library contains classes for representing glyphs of the Hershey vector fonts, for strings of glyphs, and for the fonts themselves. Also provided are interfaces to the Cairo graphics library and the Xlib library, for drawing using the Hershey vector fonts.
+
+ Hershey Vector Fonts 0.1.0
+
+ A C++ library for working with the Hershey vector fonts
+ |
+