Hershey Vector Fonts 0.1.0
A C++ library for working with the Hershey vector fonts
Loading...
Searching...
No Matches
Hershey::Font Class Reference

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.
 

Detailed Description

A Hershey vector font.

Constructor & Destructor Documentation

◆ Font()

Font::Font ( std::string  name)

Create a new font.

Parameters
nameThe name of the font to create.

Member Function Documentation

◆ get_fname()

std::string Font::get_fname ( )

Get the font's filename.

Return values
Thename of the file containing the font's raw glyph definitions.

◆ get_glyph() [1/2]

Glyph Font::get_glyph ( char  c)

Get the glyph corresponding to character c.

Parameters
cThe character to get the glyph of.
Return values
Theglyph of character c.

◆ get_glyph() [2/2]

Glyph Font::get_glyph ( int  i)

Get the i'th glyph in the font.

Parameters
iThe index of the glyph to get.
Return values
Theglyph at index i in the font.

◆ get_name()

std::string Font::get_name ( )

Get the font's name.

Return values
Thename of the font.

◆ get_num_glyphs()

int Font::get_num_glyphs ( )

Get the number of glyphs in the font.

Return values
Thenumber of glyphs in the font.

The documentation for this class was generated from the following files: