From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74271 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Dubious "checksum mismatch" message on log file Date: Thu, 2 Feb 2012 15:47:43 +0100 Message-ID: References: <20120201010904.GH13420@smoon> <20120201060009.GI13420@smoon> <20120201092131.GJ13420@smoon> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328194092 396 80.91.229.3 (2 Feb 2012 14:48:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2012 14:48:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 02 15:48:09 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsxxI-00035v-0j for gctc-ntg-context-518@m.gmane.org; Thu, 02 Feb 2012 15:48:08 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0B390CB2A0; Thu, 2 Feb 2012 15:48:07 +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 NKE9Cz8OZ7jL; Thu, 2 Feb 2012 15:48:00 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D4211CB29A; Thu, 2 Feb 2012 15:48:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2F06BCB29A for ; Thu, 2 Feb 2012 15:48:00 +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 1kTxA2P7ZH6P for ; Thu, 2 Feb 2012 15:47:45 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 6735BCB298 for ; Thu, 2 Feb 2012 15:47:45 +0100 (CET) Original-Received: from mail-gy0-f169.google.com (mail-gy0-f169.google.com [209.85.160.169]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q12ElhIh023758 for ; Thu, 2 Feb 2012 15:47:44 +0100 Original-Received: by ghrr18 with SMTP id r18so1494883ghr.14 for ; Thu, 02 Feb 2012 06:47:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=g2CwFKjYmaKd/hhj5xs8hRgLB4/tvmZY2eknhpBuDSQ=; b=LJUVqv4MXgk7v+R8JLZQ36wr3vmTF4ZuEF5H//ujlQzAAwVsnu63opLq2HQ5KQiUsz zMwpyOGahHqdFIoUEYAwJBJcntmej8xIX5w9etFqkNPjZrF/PCI3zh+VHRhs8ZEwPw0+ eCHeoic5h6KyljRIBIYcxsJDU8P+EoloilVFI= Original-Received: by 10.50.89.197 with SMTP id bq5mr3573883igb.24.1328194063183; Thu, 02 Feb 2012 06:47:43 -0800 (PST) Original-Received: by 10.50.104.71 with HTTP; Thu, 2 Feb 2012 06:47:43 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.160.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bGt2LInA - aa74ce49782a - 20120202 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:74271 Archived-At: Basically it seems coherent with the luatex manual (ch. 7 Font structure): luatex read the txr.tfm file and set the checksum to the unsigned int 0 (luafont.w ,int font_from_lua(lua_State * L, int f)) (but see Note below) Then read the vf (dofont.w, do_vf(f) inside static int do_define_font(int f, const char *cnom, scaled s, int natural_dir)) do_vf(f) calculate the checksum of the vf file vua test_checksum() macro, and find that the vf file has checksum 210 43 124 230 =>(210*2^24)+(43*2^16)+(124*2^8)+230=3526065382= oct 32212676346 vs 128 0 0 0 and hence the warning of mismatch. Note: The last sequence 128 0 0 0 (i.e. 0) it is due to i = numeric_field(L, "checksum", 0); set_font_checksum(f, (unsigned) i); where static int numeric_field(lua_State * L, const char *name, int dflt) { int i = dflt; lua_pushstring(L, name); lua_rawget(L, -2); if (lua_isnumber(L, -1)) { i = lua_roundnumber(L, -1); } lua_pop(L, 1); return i; } and #define lua_roundnumber(a,b) (int)floor((double)lua_tonumber(L,-1)+0.5) I think one can avoid the warning if set the checksum field to the correct value by the define_font callback on the lua side. -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________