# Visualization
TKService
WNT

# 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>`

## Public Member Functions

Standard_EXPORT | 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 Standard_EXPORT void | Destroy ()
| Destroys all ressources attached to the FontMapEntry .
| ~WNT_FontMapEntry ()
Standard_EXPORT Aspect_Handle | HFont () const
| Returns handle of the font. .
Standard_EXPORT 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. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Attributes

WNT_LogFont | myLogFont
Aspect_Handle | myHandle
Quantity_Factor | myScale
Quantity_PlaneAngle | mySlant

## Constructor & Destructor Documentation

Standard_EXPORT WNT_FontMapEntry::WNT_FontMapEntry | ( | const Standard_CString | aFontName | ) |

WNT_FontMapEntry::~WNT_FontMapEntry | ( |  | ) | `[inline]`

## Member Function Documentation

virtual Standard_EXPORT void WNT_FontMapEntry::Destroy | ( |  | ) | `[virtual]`

Standard_EXPORT const WNT_FontMapEntry::Handle | ( | Standard_Type |  | ) | const

Standard_EXPORT Aspect_Handle WNT_FontMapEntry::HFont | ( |  | ) | const

Standard_Address WNT_FontMapEntry::LogFont | ( |  | ) | const`[inline]`

Quantity_Factor WNT_FontMapEntry::Scale | ( |  | ) | const`[inline]`

Standard_EXPORT Aspect_Handle WNT_FontMapEntry::SetAttrib | ( | const WNT_Dword & | aFlags,
|  | const Standard_Address | aData,
|  | const Standard_Boolean | aRepl = `Standard_False`
| ) |

Quantity_Factor WNT_FontMapEntry::SetScale | ( | const Quantity_Factor | aScale | ) | `[inline]`

Quantity_PlaneAngle WNT_FontMapEntry::SetSlant | ( | const Quantity_PlaneAngle | aSlant | ) | `[inline]`

Quantity_PlaneAngle WNT_FontMapEntry::Slant | ( |  | ) | const`[inline]`

## Field Documentation

Aspect_Handle WNT_FontMapEntry::myHandle `[protected]`

WNT_LogFont WNT_FontMapEntry::myLogFont `[protected]`

Quantity_Factor WNT_FontMapEntry::myScale `[protected]`

Quantity_PlaneAngle WNT_FontMapEntry::mySlant `[protected]`

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

- WNT_FontMapEntry.hxx
- WNT_FontMapEntry.lxx