FXFont

class FXFont

Font class

Inheritance:


Public Methods

[more] FXFont(FXApp* a, const FXFontDesc& fontdesc)
Construct font from font description
[more] FXFont(FXApp* a, const FXString& face, FXuint sz, FXuint wt=FONTWEIGHT_NORMAL, FXuint sl=FONTSLANT_REGULAR, FXuint enc=FONTENCODING_DEFAULT, FXuint setw=FONTSETWIDTH_DONTCARE, FXuint h=0)
Construct a font with given face name, size in points(pixels), weight, slant, character set encoding, setwidth, and hints
[more] FXFont(FXApp* a, const FXString& nm)
Construct a font with given X11 font string
[more]virtual void create()
Create the font
[more]virtual void detach()
Detach the font
[more]virtual void destroy()
Destroy the font
[more]FXString getName() const
Get face name
[more]FXuint getSize() const
Get size in deci-points
[more]FXuint getWeight() const
Get font weight
[more]FXuint getSlant() const
Get slant
[more]FXuint getEncoding() const
Get character set encoding
[more]FXuint getSetWidth() const
Get setwidth
[more]FXuint getHints() const
Get hints
[more]void getFontDesc(FXFontDesc& fontdesc) const
Get font description
[more]void setFontDesc(const FXFontDesc& fontdesc)
Change font description
[more]FXbool isFontMono() const
Find out if the font is monotype or proportional
[more]FXbool hasChar(FXint ch) const
See if font has glyph for ch
[more]FXint getMinChar() const
Get first character glyph in font
[more]FXint getMaxChar() const
Get last character glyph in font
[more]FXint leftBearing(FXchar ch) const
Left bearing
[more]FXint rightBearing(FXchar ch) const
Right bearing
[more]FXint getFontWidth() const
Width of widest character in font
[more]FXint getFontHeight() const
Height of highest character in font
[more]FXint getFontAscent() const
Ascent from baseline
[more]FXint getFontDescent() const
Descent from baseline
[more]FXint getFontLeading() const
Get font leading [that is lead-ing as in Pb!]
[more]FXint getFontSpacing() const
Get font line spacing
[more]FXint getTextWidth(const FXchar* text, FXuint n) const
Calculate width of given text in this font
[more]FXint getTextHeight(const FXchar* text, FXuint n) const
Calculate height of given text in this font
[more]static FXbool listFonts(FXFontDesc*& fonts, FXuint& numfonts, const FXString& face, FXuint wt=FONTWEIGHT_DONTCARE, FXuint sl=FONTSLANT_DONTCARE, FXuint sw=FONTSETWIDTH_DONTCARE, FXuint en=FONTENCODING_DEFAULT, FXuint h=0)
List all fonts matching hints
[more]virtual void save(FXStream& store) const
Save font data into stream
[more]virtual void load(FXStream& store)
Load font data from stream
[more]virtual ~FXFont()
Destroy font


Inherited from FXId:

Public Methods

oFXApp* getApp() const
oFXID id() const
ovoid setUserData(void* ptr)
ovoid* getUserData() const


Inherited from FXObject:

Public Methods

oconst FXchar* getClassName() const
oFXbool isMemberOf(const FXMetaClass* metaclass) const


Documentation

Font class
o FXFont(FXApp* a, const FXFontDesc& fontdesc)
Construct font from font description

o FXFont(FXApp* a, const FXString& face, FXuint sz, FXuint wt=FONTWEIGHT_NORMAL, FXuint sl=FONTSLANT_REGULAR, FXuint enc=FONTENCODING_DEFAULT, FXuint setw=FONTSETWIDTH_DONTCARE, FXuint h=0)
Construct a font with given face name, size in points(pixels), weight, slant, character set encoding, setwidth, and hints

o FXFont(FXApp* a, const FXString& nm)
Construct a font with given X11 font string

ovirtual void create()
Create the font

ovirtual void detach()
Detach the font

ovirtual void destroy()
Destroy the font

oFXString getName() const
Get face name

oFXuint getSize() const
Get size in deci-points

oFXuint getWeight() const
Get font weight

oFXuint getSlant() const
Get slant

oFXuint getEncoding() const
Get character set encoding

oFXuint getSetWidth() const
Get setwidth

oFXuint getHints() const
Get hints

ovoid getFontDesc(FXFontDesc& fontdesc) const
Get font description

ovoid setFontDesc(const FXFontDesc& fontdesc)
Change font description

oFXbool isFontMono() const
Find out if the font is monotype or proportional

oFXbool hasChar(FXint ch) const
See if font has glyph for ch

oFXint getMinChar() const
Get first character glyph in font

oFXint getMaxChar() const
Get last character glyph in font

oFXint leftBearing(FXchar ch) const
Left bearing

oFXint rightBearing(FXchar ch) const
Right bearing

oFXint getFontWidth() const
Width of widest character in font

oFXint getFontHeight() const
Height of highest character in font

oFXint getFontAscent() const
Ascent from baseline

oFXint getFontDescent() const
Descent from baseline

oFXint getFontLeading() const
Get font leading [that is lead-ing as in Pb!]

oFXint getFontSpacing() const
Get font line spacing

oFXint getTextWidth(const FXchar* text, FXuint n) const
Calculate width of given text in this font

oFXint getTextHeight(const FXchar* text, FXuint n) const
Calculate height of given text in this font

ostatic FXbool listFonts(FXFontDesc*& fonts, FXuint& numfonts, const FXString& face, FXuint wt=FONTWEIGHT_DONTCARE, FXuint sl=FONTSLANT_DONTCARE, FXuint sw=FONTSETWIDTH_DONTCARE, FXuint en=FONTENCODING_DEFAULT, FXuint h=0)
List all fonts matching hints

ovirtual void save(FXStream& store) const
Save font data into stream

ovirtual void load(FXStream& store)
Load font data from stream

ovirtual ~FXFont()
Destroy font


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.