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

A character string comprising Hershey vector font glyphs. More...

#include <string.hpp>

Public Member Functions

 String ()
 Create a new string.
 
 String (Font font, const char *chars)
 Create a new string of glyphs of a given font.
 
String operator+ (String rhs)
 Add two strings.
 
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.
 

Detailed Description

A character string comprising Hershey vector font glyphs.

Constructor & Destructor Documentation

◆ String() [1/2]

String::String ( )

Create a new string.

The glyphs in the string.

◆ String() [2/2]

String::String ( Font  font,
const char *  chars 
)

Create a new string of glyphs of a given font.

Parameters
fontThe name of the font to use.
charsThe characters comprising the string.

Member Function Documentation

◆ get_glyph()

Glyph String::get_glyph ( int  i)

Get a i'th glyph in the string.

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

◆ get_height()

int String::get_height ( )

Get the height of the string.

Return values
Theheight of the string.

◆ get_nglyph()

int String::get_nglyph ( )

Get the number of glyphs in the string.

Return values
Thenumber of glyphs in the string.

◆ get_width()

int String::get_width ( )

Get the width of the string.

Return values
Thewidth of the string.

◆ operator+()

String String::operator+ ( String  rhs)

Add two strings.

Parameters
rhsThe string to be appended.

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