|
Open CASCADE Technology
6.7.1
|
This class defines a Font Style.
The Style can be Predefined or defined by the user
More...
#include <Aspect_FontStyle.hxx>
Public Member Functions | |
| Aspect_FontStyle () | |
Creates a font style with the default values of <br> FontStyle type : DEFAULT <br> | |
| 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. More... | |
| 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 <br>
depending of Size given in MM and Slant in RADIAN. <br>
When CapsHeight is TRUE the size defines the <br>
ascent height of the font;if FALSE,the size <br>
defines the ascent+descent part of the font. <br>
Font Style Descriptor must be : <br>
Simple form is "family" Ex: "helvetica" <br>
More complex form is "family-weight" Ex: "helvetica-bold" <br>
Full form is : <br>
"-foundry-family-weight-slant-swdth-adstyl-pixelsize" <br>
"-pointsize-resx-resy-spacing-avgWidth-registry-encoding" <br>
where each field must be replaced by an "*" <br>
Warning: create the smalest font size if the foundry height | |
| Aspect_FontStyle (const Standard_CString Style) | |
Creates a transformable font with the full font name <Style> <br> given in the XLFD descriptor : | |
| Aspect_FontStyle & | Assign (const Aspect_FontStyle &Other) |
| Updates the font style <me> from the definition of the font style <Other>. More... | |
| Aspect_FontStyle & | operator= (const Aspect_FontStyle &Other) |
| 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>. More... | |
| 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 <br> Warning: create the smalest font size if the foundry height | |
| void | SetValues (const Standard_CString Style) |
| Updates a font style with the new XLFD font descriptor More... | |
| void | SetFamily (const Standard_CString aName) |
| Sets the family of the font. More... | |
| void | SetWeight (const Standard_CString aName) |
| Sets the weight of the font. More... | |
| void | SetRegistry (const Standard_CString aName) |
| Sets the registry of the font. More... | |
| void | SetEncoding (const Standard_CString aName) |
| Sets the encoding of the font. More... | |
| Aspect_TypeOfFont | Style () const |
| Returns the type of the font style <me> More... | |
| Standard_Integer | Length () const |
Returns the string components length of the <br> font style descriptor | |
| Standard_CString | Value () const |
| Returns the String component of a font style More... | |
| Quantity_Length | Size () const |
| Returns the Size component of a font style More... | |
| Quantity_PlaneAngle | Slant () const |
| Returns the Slant component of a font style More... | |
| Standard_Boolean | CapsHeight () const |
| Returns the CapsHeight component of a font style More... | |
| Standard_CString | AliasName () const |
| Returns a shorter font name which identify the main characteristics of the fonts. More... | |
| Standard_CString | FullName () const |
| Returns the full normalized font name More... | |
| Standard_CString | Foundry () const |
| Returns the foundry of the font. More... | |
| Standard_CString | Family () const |
| Returns the family of the font. More... | |
| Standard_CString | Weight () const |
| Returns the weight of the font. More... | |
| Standard_CString | Registry () const |
| Returns the char set registry of the font. More... | |
| Standard_CString | Encoding () const |
| Returns the char set encoding of the font. More... | |
| Standard_CString | SSlant () const |
| Returns the slant of the font. More... | |
| Standard_CString | SWidth () const |
| Returns the width name of the font. More... | |
| Standard_CString | SStyle () const |
| Returns the style name of the font. More... | |
| Standard_CString | SPixelSize () const |
| Returns the pixel size of the font. More... | |
| Standard_CString | SPointSize () const |
| Returns the point size of the font. More... | |
| Standard_CString | SResolutionX () const |
| Returns the resolution X of the font. More... | |
| Standard_CString | SResolutionY () const |
| Returns the resolution Y of the font. More... | |
| Standard_CString | SSpacing () const |
| Returns the spacing of the font. More... | |
| Standard_CString | SAverageWidth () const |
| Returns the average width of the font. More... | |
| void | Dump () const |
| Dumps the font attributes. More... | |
| Standard_Boolean | IsEqual (const Aspect_FontStyle &Other) const |
| Standard_Boolean | operator== (const Aspect_FontStyle &Other) const |
| 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 |
This class defines a Font Style.
The Style can be Predefined or defined by the user
| Aspect_FontStyle::Aspect_FontStyle | ( | ) |
Creates a font style with the default values of <br> FontStyle type : DEFAULT <br>
| Aspect_FontStyle::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.
| Aspect_FontStyle::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 <br>
depending of Size given in MM and Slant in RADIAN. <br>
When CapsHeight is TRUE the size defines the <br>
ascent height of the font;if FALSE,the size <br>
defines the ascent+descent part of the font. <br>
Font Style Descriptor must be : <br>
Simple form is "family" Ex: "helvetica" <br>
More complex form is "family-weight" Ex: "helvetica-bold" <br>
Full form is : <br>
"-foundry-family-weight-slant-swdth-adstyl-pixelsize" <br>
"-pointsize-resx-resy-spacing-avgWidth-registry-encoding" <br>
where each field must be replaced by an "*" <br>
Warning: create the smalest font size if the foundry height
| Aspect_FontStyle::Aspect_FontStyle | ( | const Standard_CString | Style | ) |
Creates a transformable font with the full font name <Style> <br>
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_CString Aspect_FontStyle::AliasName | ( | ) | const |
Returns a shorter font name which identify the
main characteristics of the fonts.
| Aspect_FontStyle& Aspect_FontStyle::Assign | ( | const Aspect_FontStyle & | Other | ) |
Updates the font style <me> from the definition of the
font style <Other>.
| Standard_Boolean Aspect_FontStyle::CapsHeight | ( | ) | const |
Returns the CapsHeight component of a font style
| void Aspect_FontStyle::Dump | ( | ) | const |
Dumps the font attributes.
| Standard_CString Aspect_FontStyle::Encoding | ( | ) | const |
Returns the char set encoding of the font.
| Standard_CString Aspect_FontStyle::Family | ( | ) | const |
Returns the family of the font.
| Standard_CString Aspect_FontStyle::Foundry | ( | ) | const |
Returns the foundry of the font.
| Standard_CString Aspect_FontStyle::FullName | ( | ) | const |
Returns the full normalized font name
| Standard_Boolean Aspect_FontStyle::IsEqual | ( | const Aspect_FontStyle & | Other | ) | const |
| Standard_Boolean Aspect_FontStyle::IsNotEqual | ( | const Aspect_FontStyle & | Other | ) | const |
| Standard_Integer Aspect_FontStyle::Length | ( | ) | const |
Returns the string components length of the <br>
font style descriptor
|
inline |
|
inline |
|
inline |
| Standard_CString Aspect_FontStyle::Registry | ( | ) | const |
Returns the char set registry of the font.
| Standard_CString Aspect_FontStyle::SAverageWidth | ( | ) | const |
Returns the average width of the font.
| void Aspect_FontStyle::SetEncoding | ( | const Standard_CString | aName | ) |
Sets the encoding of the font.
| void Aspect_FontStyle::SetFamily | ( | const Standard_CString | aName | ) |
Sets the family of the font.
| void Aspect_FontStyle::SetRegistry | ( | const Standard_CString | aName | ) |
Sets the registry of the font.
| void Aspect_FontStyle::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>.
| void Aspect_FontStyle::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 <br>
Warning: create the smalest font size if the foundry height
| void Aspect_FontStyle::SetValues | ( | const Standard_CString | Style | ) |
Updates a font style with the new XLFD font descriptor
| void Aspect_FontStyle::SetWeight | ( | const Standard_CString | aName | ) |
Sets the weight of the font.
| Quantity_Length Aspect_FontStyle::Size | ( | ) | const |
Returns the Size component of a font style
| Quantity_PlaneAngle Aspect_FontStyle::Slant | ( | ) | const |
Returns the Slant component of a font style
| Standard_CString Aspect_FontStyle::SPixelSize | ( | ) | const |
Returns the pixel size of the font.
| Standard_CString Aspect_FontStyle::SPointSize | ( | ) | const |
Returns the point size of the font.
| Standard_CString Aspect_FontStyle::SResolutionX | ( | ) | const |
Returns the resolution X of the font.
| Standard_CString Aspect_FontStyle::SResolutionY | ( | ) | const |
Returns the resolution Y of the font.
| Standard_CString Aspect_FontStyle::SSlant | ( | ) | const |
Returns the slant of the font.
| Standard_CString Aspect_FontStyle::SSpacing | ( | ) | const |
Returns the spacing of the font.
| Standard_CString Aspect_FontStyle::SStyle | ( | ) | const |
Returns the style name of the font.
| Aspect_TypeOfFont Aspect_FontStyle::Style | ( | ) | const |
Returns the type of the font style <me>
| Standard_CString Aspect_FontStyle::SWidth | ( | ) | const |
Returns the width name of the font.
| Standard_CString Aspect_FontStyle::Value | ( | ) | const |
Returns the String component of a font style
| Standard_CString Aspect_FontStyle::Weight | ( | ) | const |
Returns the weight of the font.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.5