From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63049 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: manipulate ttf-fonts loaded with luatex Date: Thu, 28 Oct 2010 20:56:41 +0200 Message-ID: <4CC9C769.5020005@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> 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 1288292215 7561 80.91.229.12 (28 Oct 2010 18:56:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Oct 2010 18:56:55 +0000 (UTC) To: news3@nililand.de, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 28 20:56:53 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 1PBXeb-0005oU-N8 for gctc-ntg-context-518@m.gmane.org; Thu, 28 Oct 2010 20:56:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 11F6ACA7A8; Thu, 28 Oct 2010 20:56:49 +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 mPsYYvyhpYJg; Thu, 28 Oct 2010 20:56:45 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A0E3CCA79F; Thu, 28 Oct 2010 20:56:45 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DE5CACA79F for ; Thu, 28 Oct 2010 20:56:44 +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 Q3Cg5Qdur3Ez for ; Thu, 28 Oct 2010 20:56:42 +0200 (CEST) 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 32F29CA796 for ; Thu, 28 Oct 2010 20:56:42 +0200 (CEST) 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 o9SIufao015079 for ; Thu, 28 Oct 2010 20:56:41 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by pragma-net.nl (SurgeMail 4.3g4) with ESMTP id 11848-1713362 for multiple; Thu, 28 Oct 2010 20:53:47 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.11) Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5 ThunderBrowse/3.3.2 In-Reply-To: <1ucuymqnhaesb$.dlg@nililand.de> 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: 0BDoiUFcy - 7da5595778c8 - 20101028 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:63049 Archived-At: On 28-10-2010 7:48, Ulrike Fischer wrote: > Hm. I do have a bit the impression as if we have here a context and > latex philosophy clash. I'm not asking you to provide a funktion Huh? I'm not sure what philosophy refers to, as I'm not refering to context but to the otf loading code; so it would be a function in the lua code base (it would not even be interfaced to context as it would invalidate most of the characters in a font). > incorporated in the context code which does the job. _I_ want to > write support files for the chess ttf-fonts. If I get something > working I will perhaps add it to my package. And if something > changes in luatex or the underlying luaotfload/context code, well > then I will have to adjust my code. Sure, but the first complaints would end up in khaleds, tacos or my mailbox unless your package is private and never ends up in tex distributions). The fact that it's custom in latex to overload code and thus create a maintaince depency does not mean that I want such a dependency on my code. The context philosophy is to provide hooks and ignore all compliants about other usage cq. don't care about usage of code that is not meant to be accesses directly. (Also, Khaled then provides the interface to the latex packages.) > Couldn't you give some examples how to manipulate a font after it > has been defined with \font\test (if it is possible) and then let me > play around? I have no clue about the lualatex interface i.e. at what point you can hook in code. Keep in mind that messing around with a font before or during loading can influence other instances of that font as some data is shared. Also, once the font lives at the tex end, some data is frozen. Because some of the font's metadata is used in otf processing one cannot change that data without keeping that in mind. Anyhow, you can access some font data afterwards. In context form: \startluacode function Whatever(name) for k, v in pairs(fonts.ids[font.current()].descriptions) do if v.name == name then tex.sprint("\\char"..k.."\\relax") break end end end \stopluacode \font\test=file:pirat.ttf \def\MyChessChar#1{{\test\directlua{Whatever("#1")}}} \MyChessChar{c160} This is dead slow and inefficient but as you don't want a proper function for it I don't care too much. Interesting is that it does not work out (as wis to be expected as the normal glyph access function does something similar). Btw, a bit of testing at my end shows that there is something fishy with the font with respect to inclusion in the pdf so it can well be that the accessor is ok and something else is the problem. As taco mentioned in an earlier mail, we will look into it (even it makes not much sense). 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 ___________________________________________________________________________________