Difference between revisions of "Command/definedfont"

From Wiki
Jump to navigation Jump to search
(remove obsolete syntax table, add hint about features)
 
Line 4: Line 4:
 
}}
 
}}
  
== [[Help:Reference|Syntax]] (autogenerated) ==
+
== [[Help:Reference|Syntax]] ==
 
<syntax>definedfont</syntax>
 
<syntax>definedfont</syntax>
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
  <tr>
 
    <td colspan="2" class="cmd">\definefont<span class="first" >[...]</span></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[...]</td>
 
    <td>identifier</td>
 
  </tr>
 
</table>
 
  
  
Line 25: Line 15:
 
\definedfont[file:texgyrepagella-regular.otf at 72pt] Hello World!
 
\definedfont[file:texgyrepagella-regular.otf at 72pt] Hello World!
 
</texcode>
 
</texcode>
 +
 +
Always use a feature set, otherwise your font might lack kerning:
 +
 +
<texcode>
 +
\definedfont[Serif*default at 36pt]Serif with default features
 +
</texcode>
 +
  
 
== See also ==
 
== See also ==
 
* {{cmd|definefont}}
 
* {{cmd|definefont}}
 
* {{cmd|definefontsynonym}}
 
* {{cmd|definefontsynonym}}
 +
* {{cmd|definefontfeature}}
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==

Latest revision as of 09:46, 22 February 2021

\definedfont

Syntax

\definedfont[...]
[...]font



Description

This macro loads the font given in the identifier and immediately switches to that font. The identifier works in the same way as the second argument to \definefontsynonym: you can use either a font synonym or a real font.

Example

\definedfont[file:texgyrepagella-regular.otf at 72pt] Hello World!

Always use a feature set, otherwise your font might lack kerning:

\definedfont[Serif*default at 36pt]Serif with default features


See also

Help from ConTeXt-Mailinglist/Forum

All issues with: