ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: massifr@fastwebnet.it
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re:  automatically "smashing" È in xml typesetting
Date: Tue, 12 Apr 2016 18:42:04 +0200	[thread overview]
Message-ID: <9804790.BI1OykXjQi@max> (raw)
In-Reply-To: <570BB840.1030005@wxs.nl>

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?
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2016-04-12 16:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11  9:29 massifr
2016-04-11 14:44 ` Hans Hagen
2016-04-12 16:42   ` massifr [this message]
2016-04-12 19:56     ` Hans Hagen
2016-04-12 19:57     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9804790.BI1OykXjQi@max \
    --to=massifr@fastwebnet.it \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).