From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49177 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: new beta Date: Wed, 08 Apr 2009 09:30:12 +0200 Message-ID: <49DC5284.5040509@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040006070809030703080000" X-Trace: ger.gmane.org 1239175869 8779 80.91.229.12 (8 Apr 2009 07:31:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Apr 2009 07:31:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 08 09:32:28 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LrSGp-0004A9-A9 for gctc-ntg-context-518@m.gmane.org; Wed, 08 Apr 2009 09:32:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 94F4D1FB57; Wed, 8 Apr 2009 09:31:00 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13677-01; Wed, 8 Apr 2009 09:30:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 02A1F1FADC; Wed, 8 Apr 2009 09:30:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 034B41FADB for ; Wed, 8 Apr 2009 09:30:22 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11977-02-4 for ; Wed, 8 Apr 2009 09:30:14 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by ronja.ntg.nl (Postfix) with ESMTP id 3615C1FAD7 for ; Wed, 8 Apr 2009 09:30:14 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by filter2-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n387UDX8020563 for ; Wed, 8 Apr 2009 09:30:13 +0200 Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.9e) with ESMTP id 27048-1840426 for ; Wed, 08 Apr 2009 09:30:13 +0200 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Originating-IP: 10.100.1.100 X-Authenticated-User: hagen@controller-1 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=83.247.100.17; country=NL; region=15; city=Almelo; latitude=52.3500; longitude=6.6667; http://maps.google.com/maps?q=52.3500,6.6667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 205593979 - fb44d5c2f560 - 20090408 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:49177 Archived-At: This is a multi-part message in MIME format. --------------040006070809030703080000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable =D9=88=D9=81=D8=A7 =D8=AE=D9=84=DB=8C=D9=82=DB=8C wrote: > Hi Hans >=20 > Thanks for the code so that we can use fonts in Plain and LaTeX. >=20 > I just had two questions >=20 > 1- I got the code from Khaled. How can I get the beta myself from your > repository? I just joined ConTeXt mailing list. in most cases it's the same as on the website (the ftp is low bandwidth=20 so only used by a few) http://www.pragma-ade.com/context/latest/cont-tmf.zip > 2- Your code works fine but if in LaTeX, I compile a document like > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >=20 > \documentclass{article} >=20 > \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT >=20 > \directlua { >=20 > dofile(kpse.find_file("luatex-fonts.lua","tex")) >=20 > } >=20 > \font\body=3Dfile:XBZar.ttf:mode=3Dnode;script=3Darab;language=3Dara;+i= nit;+medi;+fina;+liga;+rlig;+mark;+mkmk > at 14pt >=20 > \def\normalfont{\body} >=20 > \AtBeginDocument{\body} >=20 > \begin{document} >=20 > =D8=A7=DB=8C=D9=86 =DB=8C=DA=A9 =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 =D8= =A7=D8=B3=D8=AA =DA=A9=D9=87 =D8=AF=D8=B1 =D8=AD=D8=A7=D9=84 =D9=88=D9=82= =D9=88=D8=B9 =D8=A7=D8=B3=D8=AA. >=20 > \section{=D9=85=D9=82=D8=AF=D9=85=D9=87} >=20 > \end{document} >=20 > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >=20 >=20 > Then it gives this error >=20 >=20 > ! LuaTeX error /home/vafa/texmf/tex/luatex-fonts/font-def.lua:337: atte= mpt > to c >=20 > all field 'read_from_afm' (a nil value). >=20 > indeed, has to do with the fact that (since we use the xetex syntax=20 there) we default to name lookups and those are tagged as afm while=20 luatex-fonts does not have that code (does not make sense) you can try the attached file (probably enough, else i have to send more) as we're in transition to luatex 0.38 i cannot post a zip today (some=20 fundamental math changes) Hans ps. keep in mind that the real advanced stuff with respect to fonts is=20 context only although node mode should work ok in luatex-fonts (add=20 mode=3Dyes to the specification) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- --------------040006070809030703080000 Content-Type: text/x-lua; name="font-dum.lua" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="font-dum.lua" if not modules then modules = { } end modules ['font-dum'] = { version = 1.001, comment = "companion to luatex-*.tex", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } fonts = fonts or { } -- general fonts.otf.pack = false fonts.tfm.resolve_vf = false -- no sure about this -- readers fonts.tfm.readers = fonts.tfm.readers or { } fonts.tfm.readers.sequence = { 'otf', 'ttf', 'tfm' } fonts.tfm.readers.afm = nil -- define fonts.define = fonts.define or { } --~ fonts.define.method = "tfm" fonts.define.specify.colonized_default_lookup = "name" function fonts.define.get_specification(str) return "", str, "", ":", str end -- logger fonts.logger = fonts.logger or { } function fonts.logger.save() end -- names fonts.names = fonts.names or { } fonts.names.basename = "luatex-fonts-names.lua" fonts.names.new_to_old = { } fonts.names.old_to_new = { } local data, loaded = nil, false function fonts.names.resolve(name,sub) if not loaded then local basename = fonts.names.basename if basename and basename ~= "" then for _, format in ipairs { "lua", "tex", "other text files" } do local foundname = input.find_file(basename,format) or "" if foundname ~= "" then data = dofile(foundname) if data then local d = { } for k, v in pairs(data.mapping) do local t = v[1] if t == "ttf" or t == "otf" or t == "ttc" then d[k] = v end end data.mapping = d end break end end end loaded = true end if type(data) == "table" and data.version == 1.07 then local condensed = string.gsub(name,"[^%a%d]","") local found = data.mapping and data.mapping[condensed] if found then local filename, is_sub = found[3], found[4] return filename, is_sub else return name, false -- fallback to filename end end end --------------040006070809030703080000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --------------040006070809030703080000--