Macro Language Reference > PIs > Text > <?tfweight>
  
<?tfweight>
Description
Selects a weight for the current text font. Note the difference between this PI and <?tfqs>: this command requests an explicit font style whereas, when using <?tfqs>, the author of a QuickFont table is permitted to assign arbitrary meanings to the slot numbers. Providing an explicit selection means that PTC ALD can take appropriate measures if a typeface is not provided for a particular combination of styles.
PTC ALD automatically creates a default QuickFont table, so that documents that want to use the QuickFont feature are no longer required to provide their own. This table will be identical to one generated by <?tqfautogen>, although without any style aliases such as “italic” or “bold.” If PTC ALD encounters a <?tfweight> command before a QuickFont table provided by the document has been activated using <?tfqt>, the automatically generated QuickFont table will be used.
Syntax
<?tfweight type:n>
type
The weight of the font:
0
Normal
1
Bold
2
Light
If the current font family does not have a typeface of the requested weight, or no font family is currently selected, a 4.25% pseudo-bold with 4.25% expanded letter-spacing is applied to the current typeface.
Additional information
The effect of the <?tffamily> PI followed by any number of <?tfitalic>, <?tfstretch>, and <?tfweight> PIs is equivalent to a <?tfqn> command followed by a <?tfqs> request for the corresponding style, provided that the active QuickFont table contains each selected combination of font family and styles. If there is no entry for a requested combination of font family and style attributes in the current QuickFont table, the closest matching font is looked up by ignoring first the desired stretch, then the weight and then the italic style. Any missing style features are then simulated — see above. This represents the key difference between the four font family/style PIs and <?tfqs>: the latter cannot make any assumptions on how the (numbered) style attributes affect the appearance of the font, if an unknown style is requested, that request is silently ignored.
Related Links