Page History
...
POS | Name | Type | Description |
---|---|---|---|
<1, 1, 1> | Name | Text | The face name of the font, e.g., "Arial" |
<1, 1, 2> | Height | Integer | Positive point size value or negative GDI value |
<1, 1, 3> | Weight | Integer | The font's weight: 400 for normal or 700 for bold |
<1, 1, 4> | Italic | Boolean | True for italic text |
<1, 1, 5> | Underline | Boolean | True for underlined text |
<1, 1, 6> | Width | Integer | The font's average character width (usually 0) |
<1, 1, 7> | Character Set | Integer | The font's character set (usually 0) |
<1, 1, 8> | Pitch and Family | Integer | The font's pitch and family (usually 24) |
<1, 1, 9> | Strikethrough | Boolean | True for strikethrough text |
<1, 1, 10> | Out Precision | Integer | The font' output precision. (usually 0) |
<1, 1, 11> | Clip Precision | Integer | The font' clipping precision. (usually 0) |
<1, 1, 12> | Quality | Integer | The font's output quality. (usually 0) |
...
There are two differences in the way OLE controls process the font structure. First, blank sub-values are interpreted as "leave alone," i.e., you can pass data to only those elements you wish to change. For example, the following code only changes the font's weight to bold (700).
Code Block |
---|
// Set the current font to bold
Set_Property(@Window:".OLE_CTRL", "OLE.Font", @SVM:@SVM:700) |
The second difference has to do with setting the font's height. Normally, the font's height is set in "logical units," a Microsoft convention. A positive value in this field says you want some space between lines of text while a negative value means you want to use a specific "logical" height. However, OI developers usually only care about point size. We like to say, "Arial, 8 pt." -- not, "Arial, -11". Therefore, OLE controls will treat positive values as point sizes. So you can set an OLE control's font size to 8 pt. in two ways:
Code Block |
---|
// Set the current font to 8 pt.
Set_Property(@Window:".OLE_CTRL", "OLE.Font", @SVM:8)
Set_Property(@Window:".OLE_CTRL", "OLE.Font", @SVM:-11) |