Class Win32Font
Font implementation based on Win32 API system fonts.
Inherits from
-
(base class)Font
Constructors
Name | Description |
---|---|
this
|
need to call create () after construction to initialize font
|
Fields
Name | Type | Description |
---|---|---|
_baseline
|
int |
|
_drawbuf
|
Win32ColorDrawBuf |
|
_face
|
string |
|
_family
|
FontFamily |
|
_glyphCache
|
GlyphCache |
|
_height
|
int |
|
_hfont
|
void* |
|
_italic
|
bool |
|
_logfont
|
win32. |
|
_size
|
int |
|
_weight
|
int |
|
_refCount
|
int |
count of references to this object from Ref
|
Properties
Name | Type | Description |
---|---|---|
baseline
[get]
|
int |
returns baseline offset
|
face
[get]
|
string |
returns font face name
|
family
[get]
|
FontFamily |
returns font family
|
height
[get]
|
int |
returns actual font height including interline space
|
isNull
[get]
|
bool |
returns true if font object is not yet initialized / loaded |
italic
[get]
|
bool |
returns true if font is italic
|
size
[get]
|
int |
returns font size (as requested from font engine)
|
weight
[get]
|
int |
returns font weight
|
antialiased
[get]
|
bool |
return true if antialiasing is enabled, false if not enabled |
isFixed
[get]
|
bool |
returns true if font has fixed pitch (all characters have equal width) |
refCount
[get]
|
int |
returns current value of reference counter |
spaceWidth
[get]
|
int |
returns true if font is fixed |
Methods
Name | Description |
---|---|
checkpoint
|
clear usage flags for all entries
|
cleanup
|
removes entries not used after last call of checkpoint () or cleanup ()
|
clear
|
cleanup resources
|
create
|
init from font definition |
getCharGlyph
|
get character glyph information |
getGlyphIndex
|
|
addRef
|
increments reference counter |
charWidth
|
returns character width |
drawColoredText
|
Draw text string to buffer.
|
drawText
|
Draw text string to buffer.
|
measureText
|
Measure text string, return accumulated widths [] (distance to end of n-th character), returns number of measured chars.
|
releaseRef
|
decrement reference counter, destroy object if no more references left |
textSize
|
Measure text string as single line, returns width and height
|
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0