<< Click to Display Table of Contents >> VpeSetFontAttr |
Sets all font-attributes at once.
void VpeSetFontAttr(
VpeHandle hDoc,
int alignment,
int bold,
int underline,
int italic,
int strikeout
)
VpeHandle hDoc
Document Handle or VPE Object Handle
int alignment
possible values are:
Constant Name |
Value |
Comment |
ALIGN_LEFT |
0 |
|
ALIGN_RIGHT |
1 |
|
ALIGN_CENTER |
2 |
|
ALIGN_JUSTIFIED |
3 |
|
ALIGN_JUSTIFIED_AB |
5 |
|
int bold
Value |
Description |
True |
bold |
False |
not bold |
int underline
Value |
Description |
True |
underlined |
False |
not underlined |
int italic
Value |
Description |
True |
italic |
False |
not italic |
int strikeout
Value |
Description |
True |
strikeout |
False |
not strikeout |
Default:
ALIGN_LEFT, False, False, False, False
Remarks:
Italic fonts are a bit higher than non-italic fonts. This is caused by the Windows System GDI. The consequence is, that italic text needs more height, which might result in clipped (not drawn) text, in case the height returned by a text-render method for a non-italic font is used for an italic font.
ALIGN_JUSTIFIED_AB: Text will be aligned justified. In contrast to ALIGN_JUSTIFIED, which aligns the last line left aligned, the last line of the text will also be aligned justified - if it is not ending with a CR / LF character. This flag works only for plain text, not for RTF.