[Fontinst] Re: Bug in fontinstversion{1.927}

Peter Dyballa Peter_Dyballa at Web.DE
Mon Jan 31 13:40:49 CET 2005


Am 30.01.2005 um 16:25 schrieb Lars Hellström:

> At 22.05 +0100 2005-01-27, Peter Dyballa wrote:
>> It's no problem for me to write that I do not understand (now or in
>> future) what you wrote,
>
> It sometimes happens that the reason a student fails to understand
> something is that (s)he spends too much time asking and not enough time
> studying the available literature. :-)

Yes, can be. My problem is that for my other problem there is almost no 
literature available: how to map the fontinst names to Unicode 
descriptions? Which is the right tie accent? What do I need to do with 
all those capital or bigger accents that can't easily be mapped? 
Neglect them? If so: when will I see boxes in a TeX document? And, 
damned, why do I see a tie accent hovering over soufflés that comes 
from some completely different font?! (There *can* be some literature 
about exactly this that I haven't discovered or searched for yet!)

>
>> it's a bit too far away from my experience and
>> my understanding. Isn't this statement doing the translation I
>> mentioned before:
>>
>> 	\ifisglyph{afii61352}\then              \setglyph{numero}
>> \glyph{afii61352}{1000} \endsetglyph \Fi
>
> This selects a glyph by name, not by its slot in some encoding.

This is exactly what I believe too. I tried to give an example for what 
I call a "name translation." The cited one happens late during the 
\installfonts phase. I think it's worth doing it before, as a 
preparation of this final step of setting all already set up together.

To me it makes no difference whether I reference something by a number 
or a name, it's just one of many techniques to deal with things that 
are more complicated and meaningful than nothing. In real life I prefer 
real names, in IT life I prefer numbers, for example "(a) show" as in 
PostScript. (Can it be that it's not possible to write "(/a) show" in 
PS trying to output only the "a" without the "/" that addresses the "a" 
by its proper name?) And my access of IT things is rewarded from 
success: although the different TT fonts use different names I do not 
have to create different TeX formats as TT font drivers, it's 
completely sufficient that I stay to one syntax when addressing the 
wanted glyph by different TrueType glyph names (baht or bahtthai or 
Thaibhat or ...). As far as I know TeX addresses members of a font set 
by numbers, at least for DVI output.

My understanding of my procedure

    ttf2pt1 -l adobestd font.ttf font8a
    ttf2pt1 -L 8p.map   font.ttf font8p

and then in fontinst

    \transformfont{font8r}{\reencodefont{8r}{\fromafm{font8a}}}
    \afmtomtx{font8p} {font8p}
    \mtxtopl{font8p} {font8p}
                                 the name translation as mentioned above
and a bit later in fontinst             |
                                         v
     \installfont{font8t}{font8r,font8p,8p,newlatin}{t1}{T1}{fnt}{m}{n}{}

and in the map file

     font8p FontName <font8p.pfb
     font8r FontName <8r.enc <font8a.pfb " TeXBase1Encoding ReEncodeFont 
"

is that I create a set of files that all bear a certain rule, an 
encoding -- or two, 8a and 8p (8r is something hypothetical or virtual 
to me since it is in the map file accomplished). When I then do the 
"translation"

   let:   name 2b at pos 2 in b of class 8p   equal   name 2a at pos 2 
in a of class 8p (too)

no encoding changes (in the MTX file), except for the "encoding by 
name," that's now different -- but who else except of you cares? (Well, 
it's me, of course, since I don't have to learn by heart another 
encoding of up to 256 different names. The first 256 numbers I know by 
heart since some war time.) As I tried to show above, in my 
understanding TeX does not care of names but takes the position in an 
ordered set (my English can be bad at this point and I'm not used to 
mathematics too) to address a member of this set. So why should I 
consider names? They're just for us not that perfect humans planning 
globalization and other means of terrorism, as software and computers.

>
> Selecting glyphs by Unicode character is even at best an
> imperfect mechanism, so there are tasks at which it will fail. (Cf. the
> tex-fonts list posting on ttf2afm by Laurent SIEBENMANN recently.)

Yes, I did understand that he is doing the same mistake so I reassured 
myself again not to pay that much attention to ttf2afm -- since *I* can 
use my own software! Or XeTeX/XeLaTeX.


> And, to reiterate, I think \reglyphfont can do what you wanted
> \translatefont to do, even though it doesn't quite have the interface 
> you
> imagined.

In my understanding of \reglyphfont it is not the same as the proposed 
\translatefont because it needs to know both *names* ("to" and 
particularly "from") exactly which I try to avoid because it's sheer 
nonsense to write routines for literally thousands of deviating names 
that can change with re- or new release! \translatefont should take a 
name at a specified position, that is not .notdef (or already the 
proper one), and make it to become the proper one.

I think that sometimes pointers can be quite nice and helpful. (And to 
me the index, code position, entry in a CharString or real dictionary 
or whatever, a so-called "name" or an all upper case description, for 
example, is a pointer that points to exactly the thing I mean -- as all 
these words too, I hope.)

--
Greetings

   Pete



More information about the fontinst mailing list