ubit
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
ubit::UFontFamily Class Reference

A Font Family represents a collection of fonts for all possible sizes and styles. More...

#include <ufont.hpp>

Inheritance diagram for ubit::UFontFamily:
ubit::UObject

Classes

struct  Defs
 

Public Member Functions

 UFontFamily (const UStr &logical_name)
 create a new font family.
 
UFontFamilyoperator= (const UFontFamily &)
 
const UStrgetName () const
 
void setFamily (const char *native_families)
 changes font characteristics for this family (args are coma separated lists).
 
void setStyles (const char *normal_styles, const char *italic_styles)
 changes font characteristics for this family.
 
void setWeights (const char *normal_weights, const char *bold_weights)
 changes font characteristics for this family.
 
void setCompression (const char *compressions)
 
void setEncoding (const char *encodings)
 
void setPreferredSizes (const char *sizes)
 
void setFreeType (const char *regular_files, const char *bold_files, const char *italic_files, const char *bold_italic_files)
 specifies FreeType font files for this family. More...
 
- Public Member Functions inherited from ubit::UObject
 UObject (const UObject &)
 
UObjectoperator= (const UObject &)
 
virtual const UClassgetClass () const
 instance method that returns the metaclass of this object. More...
 
const UStrgetClassName () const
 returns getClass().getName().
 
virtual void error (const char *function_name, const char *format,...) const
 prints out an error message. More...
 
virtual void warning (const char *function_name, const char *format,...) const
 prints out a warning message: More...
 
bool isDeletable () const
 checks if this object can be destroyed by 'delete'. More...
 
bool isConst () const
 checks whether the content of this object can be modified ( More...
 
UObjectsetConst ()
 specifies that the content of this object cannot be modified. More...
 
bool isAutoUpdate () const
 return current update policy: More...
 
UObjectsetAutoUpdate (bool state=true)
 changes the update policy of this object when its is modified. More...
 
bool isIgnoringChangeCallbacks () const
 return true if change callbacks are fired.
 
UObjectignoreChangeCallbacks (bool state)
 change callbacks are not fired if argument is true.
 
virtual UNodetoNode ()
 dynamic cast: returns this object if it derives from UNode and null otherwise.
 
virtual const UNodetoNode () const
 dynamic cast: returns this object if it derives from UNode and null otherwise.
 
virtual UAttrtoAttr ()
 dynamic cast: returns this object if it derives from UAttr and null otherwise.
 
virtual const UAttrtoAttr () const
 dynamic cast: returns this object if it derives from UAttr and null otherwise.
 
virtual UElemtoElem ()
 dynamic cast: returns this object if it derives from UElem and null otherwise.
 
virtual const UElemtoElem () const
 dynamic cast: returns this object if it derives from UElem and null otherwise.
 
virtual UDatatoData ()
 dynamic cast: returns this object if it derives from UData and null otherwise.
 
virtual const UDatatoData () const
 dynamic cast: returns this object if it derives from UData and null otherwise.
 
virtual UStrtoStr ()
 dynamic cast: returns this object if it derives from UStr and null otherwise.
 
virtual const UStrtoStr () const
 dynamic cast: returns this object if it derives from UStr and null otherwise.
 
virtual UCalltoCall ()
 dynamic cast: returns this object if it derives from UCall and null otherwise.
 
virtual const UCalltoCall () const
 dynamic cast: returns this object if it derives from UCall and null otherwise.
 
virtual UBoxtoBox ()
 dynamic cast: returns this object if it derives from UBox and null otherwise.
 
virtual const UBoxtoBox () const
 dynamic cast: returns this object if it derives from UBox and null otherwise.
 
virtual UWintoWin ()
 dynamic cast: returns this object if it derives from UWin and null otherwise.
 
virtual const UWintoWin () const
 dynamic cast: returns this object if it derives from UWin and null otherwise.
 
virtual UMenutoMenu ()
 dynamic cast: returns this object if it derives from UMenu and null otherwise.
 
virtual const UMenutoMenu () const
 dynamic cast: returns this object if it derives from UMenu and null otherwise.
 
State getState () const
 returns the current object state.
 
void setState (State s)
 changes the object state.
 
PtrCount getPtrCount () const
 [impl] returns the number of uptr<> smart pointers that are pointing to this object.
 
bool checkConst () const
 [impl] produces an error if this object is logically constant ( More...
 
bool isDestructed () const
 [impl] this object has been destructed (but memory has not been freed yet).
 
bool isDestructing () const
 [impl] this object is being destructed (one of its destructors has been called).
 
virtual bool hasSceneGraphParent () const
 
void * operator new (size_t)
 < [impl] returns true if there is at least one scene graph parent (redefined by UNode). More...
 
void operator delete (void *)
 delete operator is forbidden on instances that derive from UObject.
 
void addPtr () const
 [Impl] a uptr is added to this object.
 
void removePtr () const
 [Impl] a uptr is removed from this object.
 

Static Public Attributes

static UFontFamily sans_serif
 
static UFontFamily serif
 
static UFontFamily monospace
 predefined font families that can be used in UFont(s).
 
static UFontFamily defaults
 specifies default characteristics used when FontFamilies can't be found should be changed before creating the UAppli
 
- Static Public Attributes inherited from ubit::UObject
static UConst UCONST
 UCONST can be given as an argument to some constructors to make the object constant. More...
 

Protected Member Functions

 UFontFamily (const char *logical_name, UConst)
 
 UFontFamily (const UFontFamily &)
 
void initSizes () const
 
int sizeToIndex (float fsize) const
 

Protected Attributes

int ffindex
 
bool ready
 
UStr name
 
std::vector< int > fsizes
 
struct ubit::UFontFamily::Defs defs
 
- Protected Attributes inherited from ubit::UObject
PtrCount ptr_count
 
Modes omodes
 
State ostate
 

Static Protected Attributes

static int family_count = 0
 

Friends

class UFontDesc
 
class UHardFont
 
class UDisp
 

Additional Inherited Members

- Public Types inherited from ubit::UObject
typedef unsigned char State
 
typedef short PtrCount
 
- Static Public Member Functions inherited from ubit::UObject
static const char * getVersion ()
 returns the version of the Ubit package.
 
static const UClassClass ()
 class method that returns the metaclass of this class. More...
 
static UStylecreateStyle ()
 

Detailed Description

A Font Family represents a collection of fonts for all possible sizes and styles.

Note that actual fonts are only loaded when necessary

Member Function Documentation

§ setFreeType()

void UFontFamily::setFreeType ( const char *  regular_files,
const char *  bold_files,
const char *  italic_files,
const char *  bold_italic_files 
)

specifies FreeType font files for this family.

each argument is a comma separated list of of font pathnames (the first available one is used).


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