GUIDOLib  1.7.7
A Music Score Rendering Engine
Public Types | Public Member Functions | Protected Member Functions | List of all members
VGFont Class Referenceabstract

Generic pure virtual & device-independant font class. More...

Public Types

enum  { kFontNone = 0, kFontBold = 1, kFontItalic = 2, kFontUnderline = 4 }
 Font properties. More...
 

Public Member Functions

virtual ~VGFont ()
 
virtual const char * GetName () const =0
 Returns the current object's name (as a string) More...
 
virtual int GetSize () const =0
 Returns the current object's size (as an int) More...
 
virtual int GetProperties () const =0
 Returns the current object's property value(s) (see enum above) More...
 
virtual void GetExtent (const char *s, int inCharCount, float *outWidth, float *outHeight, VGDevice *context) const =0
 
virtual void GetExtent (int c, float *outWidth, float *outHeight, VGDevice *context) const =0
 

Protected Member Functions

void * GetContext (VGDevice *context) const
 

Detailed Description

Generic pure virtual & device-independant font class.

This class replaces the previously defined GFontInfos class that was attached to a VGDevice. It declares the minimal set of necessary methods/attributes to use a font. Fonts can now be seen as independant objects to be created by the VGSystem and then associated when necessary to the VGDevice.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Font properties.

Enumerator
kFontNone 
kFontBold 
kFontItalic 
kFontUnderline 

Constructor & Destructor Documentation

◆ ~VGFont()

virtual VGFont::~VGFont ( )
inlinevirtual

Member Function Documentation

◆ GetContext()

void* VGFont::GetContext ( VGDevice context) const
inlineprotected

◆ GetExtent() [1/2]

virtual void VGFont::GetExtent ( const char *  s,
int  inCharCount,
float *  outWidth,
float *  outHeight,
VGDevice context 
) const
pure virtual

Computes the width and height of the input string using the current font capabilities in the input VGDevice

◆ GetExtent() [2/2]

virtual void VGFont::GetExtent ( int  c,
float *  outWidth,
float *  outHeight,
VGDevice context 
) const
pure virtual

Computes the width and height of the input character using the current font capabilities in the input VGDevice

◆ GetName()

virtual const char* VGFont::GetName ( ) const
pure virtual

Returns the current object's name (as a string)

◆ GetProperties()

virtual int VGFont::GetProperties ( ) const
pure virtual

Returns the current object's property value(s) (see enum above)

◆ GetSize()

virtual int VGFont::GetSize ( ) const
pure virtual

Returns the current object's size (as an int)


Guido Project Copyright © 2019 Grame-CNCM