From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13867 Path: main.gmane.org!not-for-mail From: "Adam Lindsay" Newsgroups: gmane.comp.tex.context Subject: Re: Expert fonts Date: Thu, 16 Oct 2003 18:35:05 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <20031016173506.7776@news.comp.lancs.ac.uk> References: <0EF521FB-FFAD-11D7-8EC4-00039318D414@uni-bonn.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="==_20031016173505.4142-1_==" X-Trace: sea.gmane.org 1066326212 27610 80.91.224.253 (16 Oct 2003 17:43:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2003 17:43:32 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu Oct 16 19:43:30 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAC9q-0002j6-00 for ; Thu, 16 Oct 2003 19:43:30 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 7EB0810B50; Thu, 16 Oct 2003 19:43:28 +0200 (MEST) Original-Received: from mail.comp.lancs.ac.uk (mail.comp.lancs.ac.uk [148.88.3.45]) by ref.ntg.nl (Postfix) with ESMTP id C190710B4C for ; Thu, 16 Oct 2003 19:35:05 +0200 (MEST) Original-Received: from [148.88.168.192] (gfb008000005.lancs.ac.uk [148.88.168.192]) by mail.comp.lancs.ac.uk (8.12.10/8.12.10) with ESMTP id h9GHZ261007648; Thu, 16 Oct 2003 18:35:02 +0100 (BST) Original-To: , "Thomas A.Schmitz" In-Reply-To: <0EF521FB-FFAD-11D7-8EC4-00039318D414@uni-bonn.de> X-Mailer: CTM PowerMail 4.2.1 us Carbon Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:13867 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13867 --==_20031016173505.4142-1_== Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello, Thomas. I've been experimenting a little bit with this, especially with the lovely Hoefler fonts on my own Mac. My approach would be to "synthesise" a new encoding, semi-automatically, based on the fact that most variant glyphs have glyph names that vary by a suffix. How comfortable are you with the command line? How about perl? The attached experimental script (very primitive--hand-edit to change parameters!) will take in an afm from a large font, a base encoding, and a series of suffixes to search through, and output a 256-character encoding. It's easier to have an example: The base encoding has: \eight \nine \at \A \H The input suffixes to search (in decreasing precedence order) are: "alttwo", "altone", "linefinalswash", "oldstyle" HoeflerTextItalic.afm has (among others): C -1 ; WX 465 ; N eight ; B 11 -21 451 681 ; C -1 ; WX 488 ; N nine ; B -39 -225 412 455 ; C -1 ; WX 764 ; N at ; B 44 -22 737 704 ; C -1 ; WX 767 ; N A ; B -61 -6 680 704 ; C -1 ; WX 808 ; N H ; B -33 -6 872 689 ; C -1 ; WX 570 ; N eightstandard ; B 56 -22 534 700 ; C -1 ; WX 570 ; N ninestandard ; B 34 -78 547 701 ; C -1 ; WX 500 ; N eightoldstyle ; B 38 -21 478 682 ; C -1 ; WX 500 ; N nineoldstyle ; B -23 -226 428 456 ; C -1 ; WX 351 ; N eightfractiondiasuperior ; B -8 261 317 694 ; C -1 ; WX 375 ; N ninefractiondiasuperior ; B -25 227 336 694 ; C -1 ; WX 473 ; N Asmall ; B -25 -6 477 468 ; C -1 ; WX 625 ; N Hsmall ; B 1 -6 626 456 ; C -1 ; WX 1077 ; N Aaltone ; B -13 -44 1055 711 ; C -1 ; WX 1014 ; N Haltone ; B -24 -95 1135 739 ; C -1 ; WX 1186 ; N Halttwo ; B -14 -95 1307 739 ; ... The output encoding would be: \eightoldstyle \nineoldstyle \at \Aaltone \Halttwo It kind of works. Of course, you can do this sort of thing by hand (some examples in my OpenType for context magazine article, website currently down), but it becomes a bit tedious. Any thoughts? I hope to work on this a little more, soon, but it's a busy season for academics. :/ Disclaimers: Just a Saturday morning's experiment. Small caps are treated oddly. Search is pretty much brute-force. Absolutely no user-interface whatsoever. Cheers, adam Thomas A.Schmitz said this at Thu, 16 Oct 2003 09:47:57 +0200: >Expert fonts have been mentioned on this list several times, but I'd >like to know if anybody could point me to e tutorial/example how to >make them work in Context. The background of my question: on my Mac, I >have a nice-looking truetype font "HoeflerText" which has most glyphs >of an expert font (oldstyle numbers, small caps, additional ligatures >etc.), and I wonder if it would be possible to split it up into several >type 1 fonts (via pfaedit) and make them work like an expert family. >Any suggestions about this? >Thanks! >Thomas -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --==_20031016173505.4142-1_== Content-Type: application/octet-stream; name="enco.pl"; x-mac-type="00000000"; x-mac-creator="00000000" Content-Disposition: attachment Content-Transfer-Encoding: base64 IyEvdXNyL2Jpbi9wZXJsCm9wZW4oRU5DLCAidGV4bmFuc2kuZW5jIik7CiNvcGVuKEVOQywg ImVjLmVuYyIpOwpvcGVuKEFGTSwgIkhvZWZsZXJUZXh0SXRhbGljLmFmbSIpOwojb3BlbihB Rk0sICJBcHBsZUNoYW5jZXJ5LmFmbSIpOwoKbXkgQG1hdGNoZXI7Cm15IEBjYW5kaWRhdGVz ID0gKCJhbHR0d28iLCJhbHRvbmUiLCJsaW5lZmluYWxzd2FzaCIsIm9sZHN0eWxlIiwiIik7 CiNteSBAY2FuZGlkYXRlcyA9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