On 2/23/2017 11:58 AM, Ulrike Fischer wrote:
When using input like the following with xetex then harfbuzz kicks
in and one would always get the good looking precomposed U+1EA0 for
the A and the decomposed B+U+0323 for the B.

With context (and lualatex) one get a rather bad looking -- as the
dot is misplaced -- output for the A^^^^0323 input and no output at
all for ^^^^1e04.

As the coverage for precomposed glyphs varies a lot across fonts
this is rather a nuisance.  Is there a way to get the fontloader
(also the one used by luaotfload) to do a similar substituation as
done by harfbuzz?

\starttext
\catcode`\^= 7
Ạ A^^^^0323  %decomposed input -> U+1EA0 with xetex

Ạ  ^^^^1ea0  %precomposed input


Ḅ B^^^^0323  %decomposed input

^^^^1e04     %precomposed input -> B+U+0323 with xetex


\stoptext


(I added the ^^-notation to avoid problems with copy&paste)

In context one can enable a collapse (last week i found out that it was off by default).

Anyway, there are two issues here:

(1) one can in the input stream collapse the dot accent and the other character but of course an altered input might not be what one wants, for instance because fonts fonts not always provide a decompose (ccmp) or composed glyphs

(2) one can mess at the node list level which has a potyential drawback that one cannot get a character (explicit \char) there without the danger of it being mangled

so, whatever method one chooses, it has to be controlled because in tex all is about control (think of verbatim)

I have a file here that implements a pseudo feature that does this kind of (trivial) magic and I can add that to the distribution. (btw, I suppose that xetex can disable that on demand as from your post I deduce that it's default behaviour and fighting defaults is a pain).

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to