From: Ulrike Fischer <news3@nililand.de>
To: ntg-context@ntg.nl
Subject: Re: accessing glyphs in the private area
Date: Mon, 1 Oct 2018 11:42:26 +0200 [thread overview]
Message-ID: <1ih4s1lzjxhph$.dlg@nililand.de> (raw)
In-Reply-To: <2417d2b5-5911-977e-f84a-0fa807aedaa2@xs4all.nl>
Am Mon, 1 Oct 2018 10:20:07 +0200 schrieb Hans Hagen:
> anyway, the problem, with these private areas is that they are also used
> by the loader (and context) so in order to avoid clashes we move all
> private chars in the font to a dedicated private range
This basically means that for every document and package which uses
the generic fontloader the access to chars in the private area with
\char is now broken in luatex (in xetex it still works fine).
I just got from Claudio Beccari (which seem to have complained to
Luigi) a bug report that the libertine fonts no longer show some of
the keyboard key glyphs due to the same problem.
Can you tell me when this change happend? Perhaps I can build an
older fontloader as a fall back.
> in your case the glyphs have no real useful names so basically i wonder
> what their use it (are they meant for direct access?)
The question on tex.sx claimed that it has the name uniF58C.
I never used the font and don't know how Therese accessed the glyphs
before, but the libertine package has long lists of mappings like
this:
\DeclareTextGlyphY{LinBiolinum_K}{uniE18C}{57740}
How do context users access such glyphs? Why is there no problem?
> you can define
>
> \def\byindex#1{\ctxlua{
> for k, v in pairs(fonts.hashes.identifiers[true].characters) do
> if v.index == #1 then
> tex.print(utf.char(k))
> break
> end
> end
> }}
>
> {\definedfont[Coelacanth] test \byindex{\number"00A33}}
I don't see a use of accessing this glyphs by index - index
positions can change if the font is updated. This can only be a last
resort for glyphs without unicode position.
The only sensible access is by unicode number (which works).
> I can remap those privates to a normalized private name, like P0F581 but
> it depends on how bloated fonts become that have lots of privates.
>
> In that case you can have:
>
> \def\byname#1{\ctxlua{
> for k, v in
> pairs(fonts.hashes.identifiers[true].shared.rawdata.descriptions) do
> if v.name == "#1" then
> tex.print(utf.char(k))
> break
> end
> end
> }}
>
> {\definedfont[Coelacanth] test \byname {P0F581}}
It would at least mean that not the whole characters list must be
searched. And we could create a documented and stable access
command.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2018-10-01 9:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-30 20:08 Ulrike Fischer
2018-10-01 8:20 ` Hans Hagen
2018-10-01 9:42 ` Ulrike Fischer [this message]
2018-10-01 9:53 ` luigi scarso
2018-10-01 17:29 ` Hans Hagen
2018-10-01 17:55 ` Ulrike Fischer
2018-10-01 20:42 ` Hans Hagen
2018-10-02 4:55 ` luigi scarso
2018-10-02 7:29 ` Ulrike Fischer
2018-10-02 9:29 ` Hans Hagen
2018-10-02 11:39 ` Ulrike Fischer
2018-10-02 12:42 ` Hans Hagen
2018-10-01 21:11 David Carlisle
2018-10-02 9:13 ` 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='1ih4s1lzjxhph$.dlg@nililand.de' \
--to=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).