ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <pragma@wxs.nl>, news3@nililand.de
Subject: Re: manipulate ttf-fonts loaded with luatex
Date: Thu, 28 Oct 2010 17:48:12 +0200	[thread overview]
Message-ID: <4CC99B3C.9070709@elvenkind.com> (raw)
In-Reply-To: <4CC98FD6.2010100@wxs.nl>

On 10/28/2010 04:59 PM, Hans Hagen wrote:
>
> if the font is okay, accessing by glyph name will work ok

The font is an 8-bit encoding-indexed Macintosh Roman font
presenting itself as TrueType, and that is why it is so
confusing.

Because the font says it is in MacRoman encoding, and the glyph
names are pointless affairs like /c140 (which is the king symbol)
instead of sane names, fontforge takes that the '140' part of
the name is a decimal code point in MacRoman encoding.

This is correct behavior on fontforge's part, but it means that
the Unicode remap becomes slightly messy, as /c140 maps to
'LATIN SMALL LETTER A WITH RING ABOVE'., and the glyph named
/c229 (which is in fact the aring symbol) maps to 'LATIN CAPITAL A
WITH CIRCUMFLEX', and /194 (which is the Acirc) maps to 'NOT SIGN',
etc. etc. In short: the font's glyph naming is anemic.

Now, it appears that luaotfload produces a rubbish .lua file, probably
because it dumps both the MacRoman and the Unicode assignment at the
same time as a merged table. That is a bug, but that is an issue for
the luaotfload maintainers, not something for the context mailing list.

In context itself, \char140  actually and correctly produces the king
symbol.

Incidentally, in context, you can get a dump of the actually used
unicode slots by running:

   \starttext
   \showfont[PIRAT.TTF][all] % grid table
   \stoptext

or

   \usemodule[fnt-10]
   \starttext
   \ShowCompleteFont{PIRAT.TTF}{12pt}{1} % number&names table
   \stoptext


Now, about fixing it: I don't think there is much you can do with
a feature file in this case. If you want to make glyph (name) changes,
it is better to do so in the actual font file, because the fea file
will get hopelessly confusing. (and it will be specific to this
particular font file anyway), and more importantly: if you use a fea
file, you will keep hitting that luaotfload bug. So either clean up
the font yourself, or report a luaotfload bug and wait for it to be
fixed ...

Best wishes,
Taco





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


  parent reply	other threads:[~2010-10-28 15:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 10:37 Ulrike Fischer
2010-10-27 18:35 ` Aditya Mahajan
2010-10-27 20:01   ` Ulrike Fischer
2010-10-27 21:32     ` Aditya Mahajan
2010-10-28  8:34       ` Ulrike Fischer
2010-10-28 12:33         ` Hans Hagen
2010-10-28 12:57           ` Ulrike Fischer
2010-10-28 13:08             ` Taco Hoekwater
2010-10-28 13:29               ` Ulrike Fischer
2010-10-28 13:33               ` Khaled Hosny
2010-10-28 14:59                 ` Hans Hagen
2010-10-28 15:37                   ` Ulrike Fischer
2010-10-28 16:01                     ` Hans Hagen
2010-10-28 17:08                       ` Ulrike Fischer
2010-10-28 17:17                         ` Hans Hagen
2010-10-28 17:48                           ` Ulrike Fischer
2010-10-28 18:56                             ` Hans Hagen
2010-11-02 15:16                               ` Ulrike Fischer
2010-11-02 15:40                                 ` Hans Hagen
2010-10-28 19:35                             ` Hans Hagen
2010-10-28 19:46                               ` Khaled Hosny
2010-10-28 20:29                                 ` Hans Hagen
2010-10-28 15:48                   ` Taco Hoekwater [this message]
2010-10-28 15:59                     ` Khaled Hosny
2010-10-28 16:06                       ` Hans Hagen
2010-10-28 16:29                       ` Hans Hagen
2010-10-28 16:47                     ` Ulrike Fischer
2010-10-28 17:03                       ` taco
2010-10-28 19:48                         ` Khaled Hosny
2010-10-28 13:10             ` Hans Hagen
2010-10-28 13:34               ` Ulrike Fischer

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=4CC99B3C.9070709@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=news3@nililand.de \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).