* Problems with contextual kerning
@ 2013-01-15 9:08 Georg Duffner
0 siblings, 0 replies; only message in thread
From: Georg Duffner @ 2013-01-15 9:08 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Hello,
In EB Garamond I’ve implemented decomposition for all composed glyphs.
For uppercase greek I had to use contextual kerning rules: accents like
grave or acute and aspiration marks are placed left of the letter, so
the glyph has to be placed more to the right and its advance increased.
The code in the feature file looks like this:
pos [ Epsilon Eta Iota Rho ]' <79 0 79 0> @grk_tlAcc1;
Iota adscriptum needs extra space on the right of the base glyph, so
there are position rules for that too:
pos Eta' <0 0 200 0> uni0345.cap1;
and
pos Eta' <79 0 279 0> uni0345.cap1 @grk_tlAcc1;
Context (and LuaLaTeX too) doesn’t do the positioning correctly. I’ve
prepared a minimal example of uppercase etas. The first row without
decomposition, the second decomposed, the third with alternate
uni0345.cap1 (iota adscriptum). The first two should look exactly the same:
\usemodule[simplefonts]
\setmainfont[ebgaramond]
\definefontfeature[decomp][ss20=yes]
\definefontfeature[iota1][ss20=yes,cv81=1]
\starttext
ἨἩἪἫἬἭἮἯᾘᾙᾚᾛᾜᾝᾞᾟῌ \par
\addff{decomp}ἨἩἪἫἬἭἮἯᾘᾙᾚᾛᾜᾝᾞᾟῌ \par
\addff{iota1}ἨἩἪἫἬἭἮἯᾘᾙᾚᾛᾜᾝᾞᾟῌ \par
\stoptext
I use ss20 for full decomposition because it should be selected by the
user explicitly only when needed, while ccmp should be enabled by
default. The attached ctx_test.pdf shows its output. The font used can
be downloaded at
http://georgduffner.at/ebgaramond/fonts/EBGaramond12-Regular.otf. For
comparison, there’s a test page at
http://georgduffner.at/ebgaramond/etatests.html – current Firefox and
Chromium show what is expected.
There’s a second testfile at
https://github.com/georgd/EB-Garamond/blob/master/tests/context_greektests.tex
with the complete Unicode block of greek polyphonic characters, its pdf
output is attached to this mail too, a comparison html page is at
http://georgduffner.at/ebgaramond/greektests.html
Best regards,
Georg
[-- Attachment #2: ctx_test.pdf --]
[-- Type: application/pdf, Size: 6461 bytes --]
[-- Attachment #3: context_greektests.pdf --]
[-- Type: application/pdf, Size: 41866 bytes --]
[-- Attachment #4: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-15 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 9:08 Problems with contextual kerning Georg Duffner
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).