From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67607 Path: news.gmane.org!not-for-mail From: Ulrike Fischer Newsgroups: gmane.comp.tex.context Subject: Side effect of virtual fonts Date: Mon, 4 Apr 2011 17:50:27 +0200 Message-ID: <1cbrkhhzb5t7j.dlg@nililand.de> Reply-To: news3@nililand.de, mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1301932275 18939 80.91.229.12 (4 Apr 2011 15:51:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2011 15:51:15 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 04 17:51:11 2011 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 1Q6m3a-0004j3-8Z for gctc-ntg-context-518@m.gmane.org; Mon, 04 Apr 2011 17:51:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CFEB8CABA4; Mon, 4 Apr 2011 17:51:09 +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 XHt6248FxGVa; Mon, 4 Apr 2011 17:51:04 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 28C7FCABA0; Mon, 4 Apr 2011 17:51:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D00E4CABA0 for ; Mon, 4 Apr 2011 17:51:02 +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 v1khmu2lo6oJ for ; Mon, 4 Apr 2011 17:50:46 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 6BC8CCAB9A for ; Mon, 4 Apr 2011 17:50:46 +0200 (CEST) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p34FojFL012433 for ; Mon, 4 Apr 2011 17:50:45 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q6m38-0004Pt-GH for ntg-context@ntg.nl; Mon, 04 Apr 2011 17:50:42 +0200 Original-Received: from p5dd1dd65.dip.t-dialin.net ([93.209.221.101]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Apr 2011 17:50:42 +0200 Original-Received: from news3 by p5dd1dd65.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Apr 2011 17:50:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p5dd1dd65.dip.t-dialin.net User-Agent: 40tude_Dialog/2.0.15.41de X-Bayes-Prob: 0.8936 (Score 2, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.12; country=NO; latitude=62.0000; longitude=10.0000; http://maps.google.com/maps?q=62.0000,10.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rErrOJQc - 1f6e58000437 - 20110404 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:67607 Archived-At: I made two copies of luatex-fonts-demo-vf-1.lua named vf-a.lua and vf-b.lua (The original file can be found in \context-minimals\context\tex\texmf-context\tex\generic\context). In both copies I changed the three fonts the virtual font uses as basis to "Arial". In vf-b.lua I added after the for-loop which manipulates the caracters this code: f1.characters[98].width=3000000 f2.characters[98].width=3000000 f3.characters[98].width=3000000 f1.characters[97]= nil f2.characters[97]= nil f3.characters[97]= nil It has the expected effect when I use vf-b: It enlarges the width of the "b" and removes the "a" from the font. But it not only affect the vf-b-font, it also affects vf-a: If I load vf-a *after* vf-b, it also loose the "a" and the width of "b" is changed. In a older version of context, where the lua used "fonts.tfm.readanddefine" instead of the new "fonts.constructors.readanddefine" I got an side effect too, but only on the "a". My questions are 1. Why do I get the side effect only when f1, f2 and f3 call the same font? Chance (because of the math random) or something else? 2. How can I make a virtual lua-font which is free of such side effects? 3. I got errors when I tried to use the old version of the virtual font with the newest context. Is "fonts.tfm.readanddefine" now deprecated? -- Ulrike Fischer ___________________________________________________________________________________ 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 ___________________________________________________________________________________