NanoCanvas
Public Member Functions | Public Attributes | List of all members
NanoCanvas::Font Class Reference

Text font class. More...

#include <Text.h>

Public Member Functions

 Font ()=default
 
 Font (Canvas &canvas, const string &fname, const string &ttfPath)
 Creates font by loading it from the disk from specified file path. More...
 
 Font (Canvas &canvas, const string &fname, const Memery &mem, bool invalidateMem)
 Creates image by loading it from the specified memory chunk. More...
 
bool valid () const
 Check is the font face is valid. More...
 
 ~Font ()
 

Public Attributes

int face = -1
 The face id of the font. More...
 
string name = nullstr
 The font name. More...
 

Detailed Description

Text font class.

+ Collaboration diagram for NanoCanvas::Font:

Constructor & Destructor Documentation

NanoCanvas::Font::Font ( )
default
NanoCanvas::Font::Font ( Canvas canvas,
const string &  fname,
const string &  ttfPath 
)

Creates font by loading it from the disk from specified file path.

Parameters
canvasThe canvas who owns this font
fnameThe name of the font
ttfPathThe ttf file path to load
NanoCanvas::Font::Font ( Canvas canvas,
const string &  fname,
const Memery mem,
bool  invalidateMem 
)

Creates image by loading it from the specified memory chunk.

Parameters
canvasThe canvas who owns this font
fnameThe name of the font
memThe memory to load from
invalidateMemShould invalidate the memery after loading
Note
Invalidate memery is not release the memery you should do that yourself!
See also
Memery::invalidate
NanoCanvas::Font::~Font ( )
inline

Member Function Documentation

bool NanoCanvas::Font::valid ( ) const
inline

Check is the font face is valid.

Returns
Is the font face is valid

Member Data Documentation

int NanoCanvas::Font::face = -1

The face id of the font.

string NanoCanvas::Font::name = nullstr

The font name.


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

The documentation was generated by Doxygen

Copyright © 2015 Geequlim. All rights reserved.