Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
WNT_FontMapEntry Class Reference

Defines correspondence between FontMapEntry from
Aspect and Windows NT font handle. Also, provides
some optimizations due to rotation, italics & underlining
of fonts. Each font can be reffered by its name which
is a character string. The format of the string takes
after format of font name of X window system but there
are some differences. The font name string format is:
"h-w-e-o-wgt-i-u-so-cs-op-cp-q-pf-face".
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | | | | | | |
| | | | | | | | | | | | | +- name of the typeface
| | | | | | | | | | | | | (Courier, Arial ...)
| | | | | | | | | | | | +- pitch and family
| | | | | | | | | | | +- quality
| | | | | | | | | | +- clip precision
| | | | | | | | | +- out precision
| | | | | | | | +- character set
| | | | | | | +- strike out
| | | | | | +- underline
| | | | | +- italic
| | | | +- weight
| | | +- orientation
| | +- escapement
| +- width
+- height
Wildcarding is allowed by specifying '*' sign. This means
a default value for parameter.
Example: "13-8-*-*-400-*-*-*-255-1-2-*-25-courier".
For more detail information see Microsoft Windows manual.
Warning: Windows can output rotated text only if the selected for
drawing font is True Type.

#include <WNT_FontMapEntry.hxx>

Inheritance diagram for WNT_FontMapEntry:
Inheritance graph
[legend]

Public Member Functions

 WNT_FontMapEntry (const Standard_CString aFontName)
 Creates a class and loads font.
Warning: Windows finds the real font that most closely matches
the request. In doing so, it uses a
"font-mapping-algorythm". So it is possible that loaded
font differs from font in the request.
Trigger: Raises if font loading failed.

virtual void Destroy ()
 Destroys all ressources attached to the FontMapEntry

 ~WNT_FontMapEntry ()
Aspect_Handle HFont () const
 Returns handle of the font.

Aspect_Handle SetAttrib (const WNT_Dword &aFlags, const Standard_Address aData, const Standard_Boolean aRepl=Standard_False)
 Sets certain attributes ( italics etc. ) for font.
Warning: If <aRepl> is True then creates a new handle for font.
In this case calling routine MUST DELETE THE FONT ITSELF
WHEN THE FONT BECOME NO LONGER NEEDED.

Quantity_PlaneAngle SetSlant (const Quantity_PlaneAngle aSlant)
 Sets the font's slant and returns a previous one.

Quantity_Factor SetScale (const Quantity_Factor aScale)
 Sets the font's scale and returns a previous one.

Quantity_PlaneAngle Slant () const
 Returns value of the font's slant.

Quantity_Factor Scale () const
 Returns value of the font's scale.

Standard_Address LogFont () const
 Returns pointer to LogFont structure.

Protected Attributes

WNT_LogFont myLogFont
Aspect_Handle myHandle
Quantity_Factor myScale
Quantity_PlaneAngle mySlant

Constructor & Destructor Documentation


Member Function Documentation

virtual void WNT_FontMapEntry::Destroy ( ) [virtual]

Field Documentation


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