From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63037 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: manipulate ttf-fonts loaded with luatex Date: Thu, 28 Oct 2010 17:48:12 +0200 Message-ID: <4CC99B3C.9070709@elvenkind.com> References: <4CC96D7F.8040309@wxs.nl> <1xbfw9v6ufmj3.dlg@nililand.de> <4CC975B9.9050100@elvenkind.com> <20101028133259.GA5857@khaled-laptop> <4CC98FD6.2010100@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1288280918 8856 80.91.229.12 (28 Oct 2010 15:48:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Oct 2010 15:48:38 +0000 (UTC) Cc: Hans Hagen , news3@nililand.de To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 28 17:48:34 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PBUiP-0003Bb-1R for gctc-ntg-context-518@m.gmane.org; Thu, 28 Oct 2010 17:48:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13CF0CA79F; Thu, 28 Oct 2010 17:48:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GBVxmuK7pOr7; Thu, 28 Oct 2010 17:48:27 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B621CCA796; Thu, 28 Oct 2010 17:48:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 69BE2CA796 for ; Thu, 28 Oct 2010 17:48:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rIZHz5b2SNN3 for ; Thu, 28 Oct 2010 17:48:14 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 7CA84C9A7C for ; Thu, 28 Oct 2010 17:48:14 +0200 (CEST) Original-Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9SFmDY4031994 for ; Thu, 28 Oct 2010 17:48:14 +0200 Original-Received: from boo.fritz.box (boo.demon.nl [83.163.247.99]) (authenticated bits=0) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id o9SFmCBg066448; Thu, 28 Oct 2010 17:48:12 +0200 (CEST) (envelope-from taco@elvenkind.com) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100809 Mandriva/3.1.2-3mdv2011.0 (2011.0) Thunderbird/3.1.2 In-Reply-To: <4CC98FD6.2010100@wxs.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=194.109.24.35; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DofMdAv - 0ac05bcb260d - 20101028 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63037 Archived-At: 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 ___________________________________________________________________________________