Changes

Jump to navigation Jump to search
1,855 bytes added ,  12:34, 4 June 2021
no edit summary
< [[Fonts]]Character protrusion is a somewhat subtle advanced typographic effect in which some characters (often punctuation) are moved partially or fully into the margin in order to give it an optically smoother appearance. In ConTeXt, this is achieved via the font mechanisms within pdfTeX and LuaTeX. Much of the difficult work is done in some presets by Hans, but there are a few tricks needed in order to activate the feature.
Character protrusion This feature is a somewhat subtle advanced typographic effect in which some characters (often punctuation) are moved partially or fully also commonly called "Handling" after the font handling feature that enables it, and "Hanging" after what hyphens do into the margin in order to give it an optically smoother appearance. In ConTeXtThe microtype LaTeX package also includes a protrusion feature, this is achieved via the font mechanisms within pdfTeX. Much of the difficult work is done in some presets and may be known by Hans, but there are that name to a few tricks needed in order to activate the featurecertain audience.
This feature is also commonly called "Handling" after There are some differences between enabling character protrusion and the related font handling expansion feature that enables itbetweenMkII and MkIV, and "Hanging" after what hyphens do into so the margin. The microtype LaTeX package also includes a protrusion feature, and may be known by that name to a certain audiencefollowing discusses both separately= MkII =
Font handling is documented in the [[article:89|Fonts in ConTeXt]] manual.
== Details ==
The [[{{cmd:usetypescript|\usetypescript]] }} command has three arguments. The definitions that we use are in [[source:type-exa.tex| type-exa.tex]], and reference the low-level definitions in [[source:hand-def.tex| hand-def.tex]]. There are different possible values for each argument, which, by convention, are:
\usetypescript [''family''] [''trigger''] [''type'']
{| border="1" cellspacing="0"
</context>
=MkIV =  In MkIV , protrusion and expansion are integrated into the font feature subsystem that is also used for OpenType features. Unless you are creating a totally new typescript, the easiest way to enable protrusion is to redefinethe already existing 'default' font feature: <texcode>\definefontfeature [default] [default] [protrusion=quality,expansion=quality] \setupalign[hz,hanging] \setupbodyfont[times]</texcode> The values for the protrusion and expansion keys are defined in [[source:font-ext.lua| font-ext.lua]].  {| border="1" cellspacing="0"| rowspan="4" | ''protrusion''| '''pure''' | full protrusion of only selected punctuation|-| '''punctuation'''| partial protrusion of punctuation and some asymmetrical letters|-| '''alpha'''| variable correction of character widths|-| '''quality'''| combination of '''punctuation''' and '''alpha'''|-| rowspan="2" | ''expansion''| '''default''' | variable glyph expansions for plain ascii text (alphabetics + numerals)|-| '''quality'''| same as '''default'''|}  Just like in MkII, a reset trick is needed to get proper output from latin-modern fonts: <texcode>\definefontfeature[default][default][expansion=quality,protrusion=quality] \usetypescript[modern-base]\setupbodyfont[reset,modern] \setupalign[hz,hanging] \showframe \starttext\input tufte\stoptext</texcode> However in the current version (at least the beta 2011.02.25) there is no need to reset the bodyfont as loading is delayed till starttext anyway.  =LMTXIn LMTX it's possible to disable protrusion locally with {{cmd|noprotrusion}}, e.g.: <texcode>{\noprotrusion \quotation{protrusion disabled here.}}</texcode>
TODO
[[Category:Basics]]
[[Category:Fonts]]
gardener
51

edits

Navigation menu