* Expert fonts
@ 2003-10-16 7:47 Thomas A.Schmitz
2003-10-16 17:35 ` Adam Lindsay
2003-10-18 3:35 ` Bruce D'Arcus
0 siblings, 2 replies; 5+ messages in thread
From: Thomas A.Schmitz @ 2003-10-16 7:47 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expert fonts
2003-10-16 7:47 Expert fonts Thomas A.Schmitz
@ 2003-10-16 17:35 ` Adam Lindsay
2003-10-17 8:18 ` Thomas A.Schmitz
2003-10-18 3:35 ` Bruce D'Arcus
1 sibling, 1 reply; 5+ messages in thread
From: Adam Lindsay @ 2003-10-16 17:35 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 3058 bytes --]
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: enco.pl --]
[-- Type: application/octet-stream, Size: 933 bytes --]
#!/usr/bin/perl
open(ENC, "texnansi.enc");
#open(ENC, "ec.enc");
open(AFM, "HoeflerTextItalic.afm");
#open(AFM, "AppleChancery.afm");
my @matcher;
my @candidates = ("alttwo","altone","linefinalswash","oldstyle","");
#my @candidates = ("smallalt","small","oldstyle","");
#my @candidates = ("oldstyle",".6",".5",".4",".3",".2",".1","");
#my @candidates = ("swashwililf","swashwili","swashli","swashwi","swash","oldstyle","");
my $count = -1;
while(<ENC>) {
s/%.*$//g;
if (@matcher=/\/(\S+)/go) {
WORD: foreach my $matched (@matcher) {
foreach my $candide (@candidates) {
seek AFM, 0, 0;
while (<AFM>) {
# my $encoentry = $matched;
# if ($candide =~ /small/) {
# $encoentry =~ tr/a-z/A-Z/; }
if (/^C\s.+N\s($matched$candide)\s/g)
{ print "\\$1 % $count\n";
$count++;
next WORD;}
}
}
print "\\.notdef % $count\n";
$count++;
}}
}
close(AFM);
close(ENC);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expert fonts
2003-10-16 17:35 ` Adam Lindsay
@ 2003-10-17 8:18 ` Thomas A.Schmitz
0 siblings, 0 replies; 5+ messages in thread
From: Thomas A.Schmitz @ 2003-10-17 8:18 UTC (permalink / raw)
Hi Adam,
thanks a lot, I will look into it this coming weekend (yes, our
teaching period has just started...). I feel pretty comfortable on the
command line. My knowledge of perl is extremely limited, but I hope I
can manage. I always did these things by hand because I'm too dumb to
really understand how encodings work, but this might be a great
opportunity to learn more about this.
Best
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expert fonts
2003-10-16 7:47 Expert fonts Thomas A.Schmitz
2003-10-16 17:35 ` Adam Lindsay
@ 2003-10-18 3:35 ` Bruce D'Arcus
2003-10-19 19:35 ` Thomas A.Schmitz
1 sibling, 1 reply; 5+ messages in thread
From: Bruce D'Arcus @ 2003-10-18 3:35 UTC (permalink / raw)
In <0EF521FB-FFAD-11D7-8EC4-00039318D414@uni-bonn.de> Thomas A.Schmitz
wrote:
> 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
I don't recommend converting to type 1. Better to just use ttf2tex with
its expert switch. That'll get you access to all the standard expert
glyphs, though you'd need to write the typescripts. It'd be nice to see
someone extend ttf2tex to do this too though (it already creates all the
files for LaTeX).
Bruce
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Expert fonts
2003-10-18 3:35 ` Bruce D'Arcus
@ 2003-10-19 19:35 ` Thomas A.Schmitz
0 siblings, 0 replies; 5+ messages in thread
From: Thomas A.Schmitz @ 2003-10-19 19:35 UTC (permalink / raw)
Bruce,
thanks, I just realized I have learned enought these past weeks to make
ttf2tex work (on my Mac OS X, it would always complain that ttf2tfm was
not able to get the right combination of PID and EID, but using the -N
swicth solves that). So I end up with lots of files that should be
working. But it would be wonderful to have an example of a setup that
is known to work--how do I access all the hidden goodies of these
fonts, how do I create the mapfiles?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-19 19:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 7:47 Expert fonts Thomas A.Schmitz
2003-10-16 17:35 ` Adam Lindsay
2003-10-17 8:18 ` Thomas A.Schmitz
2003-10-18 3:35 ` Bruce D'Arcus
2003-10-19 19:35 ` Thomas A.Schmitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).