Font=<facename>, <fontattr>
(e.g. Font=Lucida Console,8001) Either part can be omitted to accept the default for that parameter; omit the comma if the <fontattr> part is omittedThe font attribute must be specified as a single decimal value formed from the sum of one or more values in the first table below (FS_xxx) and one value in the second table (FA_xxx). See Comments below for further details. Note: this table is from AUI...fontattr. Change there and copy here!!!
Symbol |
Value |
Description |
FS_UPRIGHT |
&h00 |
Normal upright |
FS_ITALIC |
&h01 |
Italic |
FS_UNDERLINE |
&h02 |
Underline |
FS_STRIKEOUT |
&h04 |
Strikeout |
Symbol |
Value |
Description |
FA_DONTCARE |
0 |
Do not care |
FA_THIN |
1600 |
Thin |
FA_EXTRALIGHT |
3200 |
Extra Light |
FA_LIGHT |
4800 |
Light |
FA_NORMAL |
6400 |
Normal |
FA_MEDIUM |
8000 |
Medium |
FA_SEMIBOLD |
9600 |
Semibold, demibold |
FA_BOLD |
11200 |
Bold |
FA_EXTRABOLD |
12800 |
Extrabold, ultrabold |
FA_HEAVY |
14400 |
Heavy |
Note that the above symbols, while recognized by the compiler, are not recognized as literal text by XTREE; they must be converted to the numeric equivalents. Also note the difference between the FA_xxx symbols used here, and the similar FW_xxx symbols used by the //SETFONT GDI printing directive; the FA_xxx symbols are shifted up 4 bits (16 times) from the FW_xxx symbols.
Comments
Note that there may not be a meaningful difference between some of the stroke weights; these are just hints to the font mapper. Most fonts only support a couple of levels of stroke weights.
When a Font option clause is associated with a real column, it affects only that column. When associated with the pseudo-column zero, it serves to define a font that can be associated with a row by means of the cformat code f. Up to 4 such Font clauses can be specified, and are implicitly numbered 1 thru 4 based on the order they appear within the coldef. Note that this logic also applies to the Scale option. For example:
Coldef += "0~0~x~H~Font=Lucida Console,1~Scale=125~~" ! Font #1: italic, 125%
Coldef += "0~0~x~H~Font=Helvetica,9600~~" ! Font #2: helvetica semibold, 100% (implied)
Coldef += "0~0~x~H~Font=,2~Scale=150~~" ! Font #3: default face, underline, 150%
Coldef += "1~10~SKU~S~Font=Cambria~~" ! Font (Cambria) applies to this column only
Coldef += "11~1~ ~fH~~" ! Row font code: 0=default, 1-3 reference above
...
The above coldef statements define 3 fonts (referenced as "1", "2", and "3") available to be used as row fonts by inserting the digit into the hidden column defined in position 11 with cformat code "fH". The column starting in position 1 (SKU) has it's own column font. Row fonts override column fonts, so the column font here would only apply to rows where position 11 was blank or "0".
Note that the up-to-four predefined row fonts are actually defined by either a Font or a Scale option, or both. If one is missing that part defaults. Each of these fonts must be defined in its own pseudo-column zero definition, i.e. must be separated from any other row font options by a double tilde as in the example above.
See Also
• cformat f (Font definition column)