#include <Aspect_FontStyle.hxx>
Public Member Functions | |
void * | operator new (size_t, void *anAddress) |
void * | operator new (size_t size) |
void | operator delete (void *anAddress) |
Standard_EXPORT | Aspect_FontStyle () |
Creates a font style with the default values of FontStyle type : DEFAULT . | |
Standard_EXPORT | Aspect_FontStyle (const Aspect_TypeOfFont Type, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False) |
Creates the font style <type> depending of Size given in the basic LENGTH unit and Slant in the basic PLANE ANGLE unit. When CapsHeight is TRUE the size defines the ascent height of the font;if FALSE,the size defines the ascent+descent part of the font. . | |
Standard_EXPORT | Aspect_FontStyle (const Standard_CString Style, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False) |
Creates a font style from Adobe font style descriptor depending of Size given in MM and Slant in RADIAN. When CapsHeight is TRUE the size defines the ascent height of the font;if FALSE,the size defines the ascent+descent part of the font. Font Style Descriptor must be : Simple form is "family" Ex: "helvetica" More complex form is "family-weight" Ex: "helvetica-bold" Full form is : "-foundry-family-weight-slant-swdth-adstyl-pixelsize" "-pointsize-resx-resy-spacing-avgWidth-registry-encoding" where each field must be replaced by an "*" Warning: create the smalest font size if the foundry height . | |
Standard_EXPORT | Aspect_FontStyle (const Standard_CString Style) |
Creates a transformable font with the full font name <style> given in the XLFD descriptor : "-foundry-family-weight-slant-swidth-adstyl-pixelsize-pointsize- <br> resx-resy-spacing-avdWidth-registry-encoding". The fields pixelsize ,pointsize,resx,resy are sets to 0 and all unknown fields sets to '*'. Example: "adobe-helvetica-bold-*-*-*-0-0-0-0-*-*-iso8859-*" Warning: the height and slant of the font is supposed to be NULL and computed dynamically at the drawing text time. . | |
Standard_EXPORT Aspect_FontStyle & | Assign (const Aspect_FontStyle &Other) |
Updates the font style <me> from the definition of the font style <other>. . | |
Aspect_FontStyle & | operator= (const Aspect_FontStyle &Other) |
Standard_EXPORT void | SetValues (const Aspect_TypeOfFont Type, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False) |
Updates the font style <me> from the definition of the font style <type>. . | |
Standard_EXPORT void | SetValues (const Standard_CString Style, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False) |
Updates a font style with the new Abode font descriptor Warning: create the smalest font size if the foundry height . | |
Standard_EXPORT void | SetValues (const Standard_CString Style) |
Updates a font style with the new XLFD font descriptor . | |
Standard_EXPORT void | SetFamily (const Standard_CString aName) |
Sets the family of the font. . | |
Standard_EXPORT void | SetWeight (const Standard_CString aName) |
Sets the weight of the font. . | |
Standard_EXPORT void | SetRegistry (const Standard_CString aName) |
Sets the registry of the font. . | |
Standard_EXPORT void | SetEncoding (const Standard_CString aName) |
Sets the encoding of the font. . | |
Standard_EXPORT Aspect_TypeOfFont | Style () const |
Returns the type of the font style <me> . | |
Standard_EXPORT Standard_Integer | Length () const |
Returns the string components length of the font style descriptor . | |
Standard_EXPORT Standard_CString | Value () const |
Returns the String component of a font style . | |
Standard_EXPORT Quantity_Length | Size () const |
Returns the Size component of a font style . | |
Standard_EXPORT Quantity_PlaneAngle | Slant () const |
Returns the Slant component of a font style . | |
Standard_EXPORT Standard_Boolean | CapsHeight () const |
Returns the CapsHeight component of a font style . | |
Standard_EXPORT Standard_CString | AliasName () const |
Returns a shorter font name which identify the main characteristics of the fonts. . | |
Standard_EXPORT Standard_CString | FullName () const |
Returns the full normalized font name . | |
Standard_EXPORT Standard_CString | Foundry () const |
Returns the foundry of the font. . | |
Standard_EXPORT Standard_CString | Family () const |
Returns the family of the font. . | |
Standard_EXPORT Standard_CString | Weight () const |
Returns the weight of the font. . | |
Standard_EXPORT Standard_CString | Registry () const |
Returns the char set registry of the font. . | |
Standard_EXPORT Standard_CString | Encoding () const |
Returns the char set encoding of the font. . | |
Standard_EXPORT Standard_CString | SSlant () const |
Returns the slant of the font. . | |
Standard_EXPORT Standard_CString | SWidth () const |
Returns the width name of the font. . | |
Standard_EXPORT Standard_CString | SStyle () const |
Returns the style name of the font. . | |
Standard_EXPORT Standard_CString | SPixelSize () const |
Returns the pixel size of the font. . | |
Standard_EXPORT Standard_CString | SPointSize () const |
Returns the point size of the font. . | |
Standard_EXPORT Standard_CString | SResolutionX () const |
Returns the resolution X of the font. . | |
Standard_EXPORT Standard_CString | SResolutionY () const |
Returns the resolution Y of the font. . | |
Standard_EXPORT Standard_CString | SSpacing () const |
Returns the spacing of the font. . | |
Standard_EXPORT Standard_CString | SAverageWidth () const |
Returns the average width of the font. . | |
Standard_EXPORT void | Dump () const |
Dumps the font attributes. . | |
Standard_EXPORT Standard_Boolean | IsEqual (const Aspect_FontStyle &Other) const |
Standard_Boolean | operator== (const Aspect_FontStyle &Other) const |
Standard_EXPORT Standard_Boolean | IsNotEqual (const Aspect_FontStyle &Other) const |
Standard_Boolean | operator!= (const Aspect_FontStyle &Other) const |
Protected Attributes | |
Aspect_TypeOfFont | MyFontType |
TCollection_AsciiString | MyStyle |
TCollection_AsciiString | MyFontName |
Standard_Real | MyFontSize |
Standard_Real | MyFontSlant |
Standard_Boolean | MyCapsHeight |
Private Member Functions | |
Standard_EXPORT void | SetPredefinedStyle (const Aspect_TypeOfFont Type, const Quantity_Length Size, const Quantity_PlaneAngle Slant, const Standard_Boolean CapsHeight) |
Set MyFontString with the predefined style value and size according of type . | |
Static Private Member Functions | |
static Standard_EXPORT Standard_CString | Normalize (const Standard_CString aFontName, Standard_Real &aSize) |
Returns a normalized descriptor from the font name <afontname> . | |
static Standard_EXPORT Standard_CString | Field (const TCollection_AsciiString &aFontName, const Standard_Integer aRank) |
Returns the field at position <arank> from the font name <afontname>. . | |
static Standard_EXPORT Standard_CString | SetField (const TCollection_AsciiString &aFontName, const Standard_CString aField, const Standard_Integer aRank) |
Sets the field at position <arank> of the fontname <afontname> from the field name <afield>. . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|