From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/19711 Path: news.gmane.org!not-for-mail From: Thomas A.Schmitz Newsgroups: gmane.comp.tex.context Subject: Re: Encoding and mapping glyphs from an expert font Date: Sat, 9 Apr 2005 23:54:11 +0200 Message-ID: <997aa0513c3060c984aba165f4533798@uni-bonn.de> References: <426B80E8@webmail.colostate.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1113083637 8840 80.91.229.2 (9 Apr 2005 21:53:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Apr 2005 21:53:57 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 09 23:53:54 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DKNtR-0006gu-VW for gctc-ntg-context-518@m.gmane.org; Sat, 09 Apr 2005 23:53:30 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 461661278B; Sat, 9 Apr 2005 23:56:03 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29100-05; Sat, 9 Apr 2005 23:56:03 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4254512796; Sat, 9 Apr 2005 23:54:18 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DDB2812796 for ; Sat, 9 Apr 2005 23:54:16 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29128-04-2 for ; Sat, 9 Apr 2005 23:54:15 +0200 (CEST) Original-Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by ronja.ntg.nl (Postfix) with ESMTP id BB9E01278B for ; Sat, 9 Apr 2005 23:54:15 +0200 (CEST) Original-Received: from fwd31.aul.t-online.de by mailout05.sul.t-online.com with smtp id 1DKNuB-0006Rw-01; Sat, 09 Apr 2005 23:54:15 +0200 Original-Received: from [192.168.0.2] (ZY8QgMZvQenr8s0b1+4f+nkt2vJFR9T4-+Gx7sDBkXKmK7r3I9RhUs@[217.226.106.146]) by fwd31.sul.t-online.de with esmtp id 1DKNu9-1B7uNs0; Sat, 9 Apr 2005 23:54:13 +0200 In-Reply-To: <426B80E8@webmail.colostate.edu> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.619.2) X-ID: ZY8QgMZvQenr8s0b1+4f+nkt2vJFR9T4-+Gx7sDBkXKmK7r3I9RhUs@t-dialin.net X-TOI-MSGID: aabde27a-2960-4cfa-b142-7498f6fc01bb X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:19711 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:19711 Idris, I am not sure I have understood everything you write, but here's a very brief outline of what I think you need to do. There are two cases you need to consider: 1. You have more than one font (this seems to be your case), normally these will be postscript type1 fonts (extensions .pfb or .pfa). If you want to mix characters from two fonts (say, normal letters from font A, oldstyle numerals and maybe small caps from font B), you can most easily do this via a virtual font. It's not too hard; I wrote a small how-to which you can find on CTAN (http://www.ctan.org/tex-archive/info/virtualfontshowto/?action=/tex- archive/info/) 2. Your expert glyphs are within the same TrueType font (extension .ttf). In that case, the approach would be to have special encoding vectors which would be used to produce special tfms. For TeX, this would then constitute a new font (this is explained in the article I sent you last week.) So there is no simple answer to your question. TeX knows to pick up zerooldstyle instead of zero either 1. because you have a virtual font that says MAPFONT 1, so it knows it will have to use a different pfb than for the rest, or 2. because the encoding file points to character zerooldstyle within the ttf. Sounds too complicated? It isnt! Best Thomas On Apr 9, 2005, at 11:02 PM, Idris Samawi Hamid wrote: > [To all the font experts out there: I really need your help!! I have > spent at > least 12 hours (!) trying to make this work but to no avail.] > > Dear gang, > > I have two fonts (actually, lots more but let's keep it simple), one > normal > and one expert. I did the following: > > 1. installed the regular font with texnansi encoding. It works fine. > It uses, > say, > > texnansi-myfont.map, texnansi-lm.enc > > with lines like > > ==================================================== > texnansi-raw-myfont MyFont 4 ==================================================== > > 2. also installed the expert font with a private encoding. Basically > the same > as > texnansi where they share characters in common. It uses, say, > > myfontx.map, myencoding.enc > > with lines like > > ==================================================== > myencoding-raw-myfontx MyFontX 4 < myfont.pfb myencoding.enc > ==================================================== > > 3. With a view to getting characters from my expert font, I carefully > studied > as best as I could the implementation of old style figures in lmr, > which > involves mappings to cmmi10. This is what I could figure out: > Activating old > style is done by > > ==================================================== > \usetypescript [modern][texnansi] > \usetypescript [map] [latin-modern-os] [texnansi] > > \usetypescript[latin-modern][texnansi] > \setupbodyfont[latin-modern] > ==================================================== > > There appear to be two main things going on (but I think I'm missing > something): > > a. loading a map file: > > ==================================================== > \starttypescript [map] [latin-modern-os] [ec,texnansi,qx,t5,pl0,il2] > \loadmapfile[\typescriptthree-os-public-lm.map] > \stoptypescript > ==================================================== > > Since I'm using texnansi, I looked at texnansi-os-public-lm.map . It > contains > lines like > > ==================================================== > texnansi-lmb10 LMRomanDemi10-Regular ==================================================== > > So I designed an encoding file myfont-plus.enc almost identical to > texnansi-os-lm.enc, containing, e.g., old style numerals from my > expert font. > I edited the myfont map files to exactly match the syntax of both > > texnansi-os-public-lm.map > and > texnansi-public-lm.map > > So for my fonts I have a total of three map files: > > \loadmapfile[texnansi-myfont.map] > % for regular font > > \loadmapfile[myencoding-myfontx.map] > % for expert font > > \loadmapfile[texnansi-x-myfont.map] > % for mapping minion reg to minion ex > >> From this point I am lost. I set up my type-myfont.tex to load these >> maps. I > can get myfont to work alone, and myfontx to work alone, but I cannot > map > characters from myfontx to myfont. > > By the way, I still don't understand how placing, e.g., /zerooldstyle > in the > respective /zero position in an encoding file will instruct > LatinModern to > pick up the glyph from cmmi10. In, for example, > > ==================================================== > texnansi-lmb10 LMRomanDemi10-Regular ==================================================== > > How does ConTeXt know that /zerooldstyle is to be mapped to cmmbi10? > I must be missing something.... > > Thnx in advance for your help > Idris > > ============================ > Professor Idris Samawi Hamid > Department of Philosophy > Colorado State University > Fort Collins, CO 80523 > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >