[Fontinst] A question about reglyphfont

Lars Hellström Lars.Hellstrom at residenset.net
Wed Oct 7 18:00:10 CEST 2009

kmc skrev:
> 2009/10/7 Lars Hellström <Lars.Hellstrom at residenset.net>
> Thanks, your method worked (*\textsc() produce REAL small caps glyphs*) but
> I still have some questions.
>> \transformfont{dtprcjq8t}{\reencodefont{t1cj}{\fromafm{dtpr8a}}}
> Here, is it that you kind of "borrowed" this t1cj.etx (which is seldom
> used), then \etxtoenc{}{} will be call when processing the 2nd file?

We mainly needed an encoding which had Asmall, Bsmall, etc. somewhere 
(doesn't really matter where), and it occurred to me that t1c (though 
originally not designed to be used with \reencodefont) would provide 
that out of the box. Changing it to t1cj additionally provides oldstyle 
figures, that can be used for making a dtpj family later.

The not so tricky alternative would have been to make a copy of 8r.etx 
(named e.g. 8rc.etx) and change glyph names a, b, c, etc. to Asmall, 
Bsmall, ..., but that requires a lot of tedious editing. ;-)

>>   \installfont{dtpr8t}{dtpr8r,dtprcjq8t,newlatin}{t1}
>>        {T1}{dtp}{m}{n}{}
>  Why did you use two fonts for dtpr8t? I though all glyphs necessary for
> dtpr8t are in dtpr8r?

One reason is that it is easier to change into a command for making 

More concretely though, I had a vague idea that _if_ your big PFB 
should happen to contain one of the more exotic T1 symbols, _and_ that 
symbol is not in 8r, then it would be picked up from dtprcjq8t instead! 
On retrospect, it may however well be that the only such symbol is 
perthousandzero, which is unlikely to appear anywhere unless the 
designer specifically meant to cover T1.

>>  \installfont{dtprc8t}{dtpr8r,dtprcjq8t,newlatin}{t1c}
>>        {T1}{dtp}{m}{sc}{}
> ** This is the most "magic" thing that I don't understand, apparently
> t1c.etx is used, but isn't it supposed to be used when creating fake small
> caps? I checked the resulting pdf, apparently the Smallcaps are the real
> Asmall, Bsmall in the pfb. How is it possible?

Yes, I noticed that comment in t1cj.etx myself today... a bit 
unfortunate. Explaining it all will require a review of some font history.

In the early days of fontinst, there used to be two ways of getting 
smallcaps glyphs: you could either fake them by shrinking the upper 
case, or get real ones from an Expert (8x) font. Either way, the glyphs 
had names like Asmall and the \installfont command should accordinly 
use t1c.etx (or rather T1c.etx, as was the name at the time). This was 
the classical set-up.

Then the foundries (probably in response to customers complaining about 
how awkward it was to type smallcaps in word processors, with upper 
case in one font and the lower case in another) started to make CSC and 
OSF variants of fonts rather than Expert variants. This made matters 
easier for word processor users, but more difficult for fontinst as the 
glyphs in a CSC font would typically be named a, b, c, ... rather than 
Asmall, Bsmall, Csmall, ... as was previously the norm. It was still 
possible to build an sc shape font, but you had to treat it like the 
italic shape and use t1.etx, because if you used t1c.etx you would get 
faked smallcaps. (latin.mtx always fakes smallcaps. newlatin.mtx that 
can be told to skip that is a later creation.) I suspect the fontinst 
maintainer at the time (probably UV) put those notices in since it was 
a clear deviation from the previous practice.

What we see today is however a return to the original Regular+Expert 
arrangement, only with all glyphs in the same font (and thus correctly 
named again, horray!). Thus we're back to using t1c.etx for getting 
smallcaps glyphs.

The examples/basic/basicex.tex file in the fontinst distro explains 
this in some detail, I think.

>> Notice how one uses 8r.enc, the other t1cj.enc (which fontinst should have
>> generated when processing make-dtp2.tex). Together, they give access to more
>> glyphs from dtpr8a.pfb than any single encoding could.
>> Now, even if I managed to avoid typos in the above, there is a risk that it
>> will error out at some step while processing t1cj.etx or t1.etx; they're
>> seldom used for reencoding, so there might be a piece of code somewhere that
>> should be conditionalised. In that case, just report back what the error
>> was.
> I think I now understand the concept, so if I'm curious enough, I can write
> my own enc file (like Minion Pro's base-MinionPro-a[a/b/c/d/e].enc, instead
> of 'hijacking' the seldom used t1cj.etx and let fontinst generate t1cj.enc?

You certainly can. But note that you also need a corresponding ETX 
file, for use by \reencodefont. Since finstmsc.sty has both \enctoetx 
and \etxtoenc however, you pick either as the "master".

> Well I think it will require much care, for the moment *if I can understand
> how the t1cj.etx and why t1c.mtx can access REAL smallcaps glyphs, I'll be
> grateful.*
I should perhaps add a note about the "q" variant I used. This was 
discussed on the tex-fonts list a couple of years back as a way of saying

   although this font is in one of the standard LaTeX encodings,
   it's not really meant to be used by TeX directly, as some
   details in it still need to be fixed. Rather, it is to be
   used as a base font for the font with those fixes in place.

It doesn't seem that suggestion made it into the Fontname 
documentation, however.

Lars Hellström

More information about the fontinst mailing list