On 4/12/2016 6:42 PM, mass...@fastwebnet.it wrote:
Thank you Hans for your example:
so I'm looking for an automatic way to replace every "È" in the text with
"\smash{È}".
\definefontfeature[default][default][dimensions={0,1.9,0}]
It took a while to understand how it works but it was worthy.
I try to summarize because others may find it useful:
- the "dimensions" feature is defined in font-ext.lua
- its parameters modify the footprint of the glyphs of a font
- its parameters are factors for glyph's width, height (over the baseline) and
depth (under the baseline)
- they are factors of emwidth, exheight and exheight respectively
- a value of zero for any of them means "leave the default value untouched",
dimensions={0,1.9,0} means that only the height of (the footprint of) glyphs
is set to 1.9 times exheight,
the other two dimensions stay untouched
Before looking at the code I started playing with the dimensions values
to understand what they controlled. One trial was this
\definefontfeature[default][default][dimensions={2,0,0}]
I got "spaced" text (glyphs have a larger footprint and appear spaced)
But this does not work:
\definefontfeature[spaced][dimensions={2,0,0}]
\starttext
Normal text and {\feature[+][spaced]spaced text}
\stoptext
Is it a feature that works only globally?
per font instance, so you can selectively use it
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________