PMFont: Difference between revisions
Appearance
Created page with "The PMFont class manages the use of fonts. You can construct, destruct, copy, and assign objects of this class. ; Source: pm_font.h:25 ; Author: Dmitry A Steklenev ; Version..." |
mNo edit summary |
||
(6 intermediate revisions by one other user not shown) | |||
Line 8: | Line 8: | ||
{| border="1" | {| border="1" | ||
|- | |- | ||
!Entity | !Entity||Type||Scope||Short Description | ||
|- | |- | ||
| | |PMFont||constructor||public||Constructs the font object from characters string. | ||
|constructor | |||
|public | |||
| Constructs the font object from characters string. | |||
|- | |- | ||
| | |name||method||public||Returns the face name of the font. | ||
|method | |||
|public | |||
| Returns the face name of the font. | |||
|- | |- | ||
| | |size||method||public||Returns the point size of the font. | ||
|method | |||
|public | |||
|Returns the point size of the font. | |||
|- | |- | ||
| | |attrs||method||public||Returns the font attributes. | ||
|method | |||
|public | |||
|Returns the font attributes. | |||
|- | |- | ||
| | |sys_font||static method||public||Returns a system font name. | ||
|static method | |} | ||
|public | |||
| Returns a system font name. | |||
|} | |||
== constructor PMFont == | == constructor PMFont == | ||
Constructs the font object from characters string. | |||
; Source: pm_font.h:58 | |||
; Param: | |||
{| border="1" | {| border="1" | ||
|- | |- | ||
|''fontname | |''fontname'' | ||
'' | |||
|The format of the font name string is as follows: | |The format of the font name string is as follows: | ||
<point size>.<face name>(.<modifer>(.<modifier>... | |||
where: | where: | ||
:<point size> is the point size of the font | |||
:<face name> is the face name of the font | |||
:<modifier> is one of the following: | |||
* Bold | * Bold | ||
Line 75: | Line 41: | ||
* Outline | * Outline | ||
* Strikeout | * Strikeout | ||
Examples are "12.New Times Roman" and "10.Helvetica.Bold.Italic" | Examples are "12.New Times Roman" and "10.Helvetica.Bold.Italic" | ||
'''Note:''' Modifiers can be used to create a font with a combination of the listed attributes. Do not use modifiers if a true font of that type is already available. For example, use "10.Helvetica Bold" instead of "10.Helvetica.Bold." | |||
|} | |||
''' | '''Code:''' | ||
public ''''''PMFont'''''' ( '''const''' '''char''' * fontname ) | |||
== method name == | == method name == | ||
Returns the face name of the font. | |||
; Source: pm_font.h:69 | |||
; Params: | |||
{| border="1" | {| border="1" | ||
|- | |- | ||
|''result | |''result'' | ||
'' | |||
|A buffer in which the face name is returned. | |A buffer in which the face name is returned. | ||
|- | |- | ||
|''size | |''size'' | ||
'' | |This is the size of the buffer specified by the ''result'' parameter. If the call is successful, this is overwritten with the number of bytes copied into the buffer. | ||
|This is the size of the buffer specified by the ''result'' | |} | ||
; Code: | |||
public '''char''' * ''''''name'''''' ( | |||
'''char''' * result , | |||
'''int''' size ) '''const''' | |||
== method size == | == method size == | ||
Returns the point size of the font. | Returns the point size of the font. | ||
; Source: pm_font.h:72 | |||
; Code: | |||
public LONG ''''''size'''''' () '''const''' | |||
== method attrs == | == method attrs == | ||
Returns the font attributes. | Returns the font attributes. | ||
; Source: pm_font.h:74 | |||
; Code: | |||
public '''const''' FATTRS * ''''''attrs'''''' () '''const''' | |||
== static method sys_font == | == static method sys_font == | ||
Returns a system font name. | |||
Allows the application to ask for details about the user interface defined fonts. | |||
Allows the application to ask for details about | |||
the user interface defined fonts. | |||
; Source: pm_font.h:98 | |||
; Param: | |||
{| border="1" | {| border="1" | ||
|- | |- | ||
|''id | |''id'' | ||
'' | |||
|Font identity: | |Font identity: | ||
''SYSFNT_WINDOWTEXT'' System font for window text. | ''SYSFNT_WINDOWTEXT'' System font for window text. | ||
Line 184: | Line 94: | ||
''SYSFNT_MENU'' System font for menu text. | ''SYSFNT_MENU'' System font for menu text. | ||
''SYSFNT_ICONTEXT'' System font for icon text. | ''SYSFNT_ICONTEXT'' System font for icon text. | ||
''SYSFNT_PREFORMATTED'' System-fixed width font for preformatted text. | ''SYSFNT_PREFORMATTED'' System-fixed width font for preformatted text. | ||
|} | |||
|} | ; Code: | ||
public '''static''' '''const''' '''char''' * ''''''sys_font'''''' ('''int''' id ) | |||
[[Category:Glass PM C++ API]] | [[Category:Glass PM C++ API]] |
Latest revision as of 00:21, 2 July 2023
The PMFont class manages the use of fonts. You can construct, destruct, copy, and assign objects of this class.
- Source
- pm_font.h:25
- Author
- Dmitry A Steklenev
- Version
- unknown
Contents
Entity | Type | Scope | Short Description |
---|---|---|---|
PMFont | constructor | public | Constructs the font object from characters string. |
name | method | public | Returns the face name of the font. |
size | method | public | Returns the point size of the font. |
attrs | method | public | Returns the font attributes. |
sys_font | static method | public | Returns a system font name. |
constructor PMFont
Constructs the font object from characters string.
- Source
- pm_font.h:58
- Param
fontname | The format of the font name string is as follows:
<point size>.<face name>(.<modifer>(.<modifier>... where:
Examples are "12.New Times Roman" and "10.Helvetica.Bold.Italic" Note: Modifiers can be used to create a font with a combination of the listed attributes. Do not use modifiers if a true font of that type is already available. For example, use "10.Helvetica Bold" instead of "10.Helvetica.Bold." |
Code:
public 'PMFont' ( const char * fontname )
method name
Returns the face name of the font.
- Source
- pm_font.h:69
- Params
result | A buffer in which the face name is returned. |
size | This is the size of the buffer specified by the result parameter. If the call is successful, this is overwritten with the number of bytes copied into the buffer. |
- Code
public char * 'name' ( char * result , int size ) const
method size
Returns the point size of the font.
- Source
- pm_font.h:72
- Code
public LONG 'size' () const
method attrs
Returns the font attributes.
- Source
- pm_font.h:74
- Code
public const FATTRS * 'attrs' () const
static method sys_font
Returns a system font name.
Allows the application to ask for details about the user interface defined fonts.
- Source
- pm_font.h:98
- Param
id | Font identity:
SYSFNT_WINDOWTEXT System font for window text. SYSFNT_WINDOWTITLES System font for window title text. SYSFNT_MENU System font for menu text. SYSFNT_ICONTEXT System font for icon text. SYSFNT_PREFORMATTED System-fixed width font for preformatted text. |
- Code
public static const char * 'sys_font' (int id )