ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: news3@nililand.de, mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: decomposed and precomposde glyphs
Date: Thu, 23 Feb 2017 16:55:08 +0100	[thread overview]
Message-ID: <dabb397b-ff01-1b15-84d4-d517c9b3cf60@wxs.nl> (raw)
In-Reply-To: <xr7688wbh7en.dlg@nililand.de>

On 2/23/2017 4:12 PM, Ulrike Fischer wrote:
> Am Thu, 23 Feb 2017 14:08:54 +0100 schrieb Hans Hagen:
>
>>> Did you sent the second mail only for me for a reason or did you
>>> only forget to add the list? Imho this is interesting for others
>>> too.
>>
>> well, it had an attachment that you can test which is not meant for
>> context (to which i'll add a similar collapse feature, off by default of
>> course as an escape) .. if that kind of stuff makes it into the latex
>> font code is up to others
>
> I looked at the code and it actually uses an idea that I had already
> tried. The problem I couldn't solve was do decompose a glyph.
> Looking at an context example it seems that context can do it. The B
> with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
> context does it? It doesn't happen with a similar latex example.
> There the U+1E04 is simply missing.
>
> And why is the dot of the first B better placed than the second?
>
>
> \starttext
> \directlua
> {
>   fonts.handlers.otf.addfeature
>   {
>     name = "compose",
>     type = "ligature",
>     data =
>         {
>           ["Ạ"]={ "A", "̣" },
>           ["Ḅ"]={ "B", "̣" },
>         },
>   }
> }
>
> \font\test={file:lmroman10-regular.otf:+compose;}
>
> \test
>
> Ḅ Ạ Ḅ %why are both B in the pdf???
>
> \stoptext

it's not a ligature but a multiple

fonts.handlers.otf.addfeature
   {
     name    = "decompose",
     type    = "multiple",
     nocheck = true, -- new trick
     data    =
         {
           ["Ḅ"] = { "Q", "̣" },
           ["Ạ"] = { "X", "̣" },
         },
   }

as with all features we check against the font so of the font has no Ḅ
nothing happens and you won't see one either (as the font has no)

i'll add the nocheck option (but of course one can expect side effects 
when a font has nothing relevant)


-----------------------------------------------------------------
                                           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	other threads:[~2017-02-23 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 10:58 Ulrike Fischer
2017-02-23 12:19 ` Hans Hagen
2017-02-23 12:35   ` Ulrike Fischer
2017-02-23 13:08     ` Hans Hagen
2017-02-23 14:05       ` Ulrike Fischer
2017-02-23 15:10         ` Hans Hagen
2017-02-23 15:12       ` Ulrike Fischer
2017-02-23 15:55         ` Hans Hagen [this message]
2017-02-23 17:26           ` Ulrike Fischer
2017-02-23 17:41             ` Hans Hagen
2017-02-23 17:47               ` Ulrike Fischer
2017-02-23 17:45             ` luigi scarso
2017-02-23 17:50               ` Ulrike Fischer
2017-02-23 18:28                 ` luigi scarso
2017-02-23 17:47             ` Hans Hagen
2017-02-23 16:20         ` Arthur Reutenauer
2017-02-24  9:35           ` Ulrike Fischer
2017-02-24 11:52             ` 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=dabb397b-ff01-1b15-84d4-d517c9b3cf60@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=news3@nililand.de \
    --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).