From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63170 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: manipulate ttf-fonts loaded with luatex Date: Tue, 02 Nov 2010 16:40:13 +0100 Message-ID: <4CD030DD.5020906@wxs.nl> References: <4CC96D7F.8040309@wxs.nl> <1xbfw9v6ufmj3.dlg@nililand.de> <4CC975B9.9050100@elvenkind.com> <20101028133259.GA5857@khaled-laptop> <4CC98FD6.2010100@wxs.nl> <4CC99E43.9090505@wxs.nl> <1bnkh4sd7r41c$.dlg@nililand.de> <4CC9B01F.1060907@wxs.nl> <1ucuymqnhaesb$.dlg@nililand.de> <4CC9C769.5020005@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 1288712436 17514 80.91.229.12 (2 Nov 2010 15:40:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Nov 2010 15:40:36 +0000 (UTC) To: news3@nililand.de, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 02 16:40:32 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 1PDIyO-0000ne-Bm for gctc-ntg-context-518@m.gmane.org; Tue, 02 Nov 2010 16:40:32 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 937FFCA80E; Tue, 2 Nov 2010 16:40:30 +0100 (CET) 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 Y6TJvjdTMqTq; Tue, 2 Nov 2010 16:40:27 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 639E5CA809; Tue, 2 Nov 2010 16:40:27 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 131E4CA809 for ; Tue, 2 Nov 2010 16:40:26 +0100 (CET) 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 qm-fmFGN4KtQ for ; Tue, 2 Nov 2010 16:40:23 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 83091CA805 for ; Tue, 2 Nov 2010 16:40:23 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oA2FeMRN006468 for ; Tue, 2 Nov 2010 16:40:22 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 4.3g4) with ESMTP id 12493-1713362 for multiple; Tue, 02 Nov 2010 16:37:15 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 ThunderBrowse/3.3.2 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=11; city=Den Haag; latitude=52.0833; longitude=4.3000; http://maps.google.com/maps?q=52.0833,4.3000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0BDqfEmlF - 917e434fa55e - 20101102 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:63170 Archived-At: On 2-11-2010 4:16, Ulrike Fischer wrote: > and store it in a table. I need a way to reencode/reorder the font, > so that the input "K" points to the glyph "c140". Pirat is not the > only chessfont I have, I don't want to change the input if I change > the font, so every chessfont should have the same internal order. (1) you can write your own fontloader (which in the case of a symbol font is no big deal, i.e. just slots and dimensions and 1-to-1 mapping as no unicode is needed, and info about that can be found in the luatex manual) (2) you can intercept the table just before it is passed to tex (for which you need to look into the bit of code that latex i.e. just before font.define is called and the table passed is the one that needs to be tweaked, that table conforms to the luatex spec) > My main problem is that they are so few informations about the > generic context font loader code. E.g. after the rereading of the > luatex manual I came up with the following: (3) some day I'll probably document the relevant (and public) part of the low level interface; till then the source is the documentation (probably of not much use outside context as we have a different font model) > 1. Why is the spacing in \testb wrong if the chars have been already > used after \test? because the font is already loaded and frozen > 2. Which values/tables in mytable should I reset/change too to get a > "sane" font \testb? whatever value you want, but before the font is passed to tex (so before font.define is called cq. the font define callback is finished in the latex code) > 3. I can also use "mytable=fonts.ids[font.id('test')]". Is this > better? What are the differences? fonts.ids accessed the font info that lives at the tex end but changing values like widths won't have any effect on tex as they are frozen already (after all they end up in backend code as well) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________