Re: Setting fonts in texinfo

Michael Eager <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <[email protected]>
On 7/4/22 04:20, Gavin Smith wrote:
> On Thu, Jun 30, 2022 at 11:38:41AM -0700, Michael Eager wrote:
>> I'm using the GNU texinfo package to generate both PDF and .info files from
>> a .texi file.
>>
>> I'm trying to update an old .texi file (not changed since 2001) and generate
>> the same PDF output. I've resolved a number of issues, but there are a
>> couple outstanding. In the old PDF, the title was in Helvetica and body text
>> is Liberation Serif. In the new PDF, both are Computer Modern.
>>
>> I've read everything that I can find about fonts, but I'm not able to change
>> the fonts. Nothing that I do seems to work. Everything I have tried
>> generates errors.
>>
>> In my .texi file, before any \setfont directives, I hxave \def\fontprefix{uh}
>> which, if I read the pdftex.map file correctly, should select the NimbusSanL
>> font set (e.g. uhvr8a.pfb). I get the following errors:
>>
>> mktexnam: Could not map source abbreviation for uhss10.
>> kpathsea: Running mktexmf uhss10
>> ! I can't find file uhss10'.
>> <*> ...ljfour; mag:=1; ; nonstopmode; input uhss10`
>>
>> Does anyone have a example .texi file which sets the font family to use?
> 
> As you can tell, there is no officially supported way of setting the fonts
> with texinfo.tex.  You have to look at the internal details of implementation
> to get anything to work.
> 
> There was a patch to use Palatino fonts.  This page (from 2009)
> 
> https://blog.sandipb.net/2009/02/12/getting-more-printable-pdfs-from-texinfo-manuals/
> 
> discusses it, although unfortunately most of the links on that page don't work.
> I don't know where you would get palatino.tex from (I think I have it saved
> on an old hard drive somewhere but it would be time-consuming for me to find
> it).
> 
> I found the following file which was based on palatino.tex
> 
> https://github.com/dalizard/sicp-pdf/blob/master/src/utopia.tex
> 
> - however, I don't know if it works.
> 
> There was another page (from 2010) here
> 
> http://blog.damn.org.za/2010/06/25/sans-serif-fonts-in-texinfo/
> 
> however, that link appears dead, and it's not on the Wayback Machine either.
> 
> Perhaps you can patch texinfo.tex to avoid the missing fonts.  E.g., the
> the name of the missing font uhss10 comes from
> 
> \def\sfshape{ss}
> \def\sfbshape{ss}
> 
> in texinfo.tex.  This is supposed to be for sans-serif, but it's very likely
> that your Texinfo document doesn't rely on sans-serif fonts.

Thanks.  I'll take a look at the links you mentioned.

I was aware that the uhss10 came from the define for SS fonts, but I, 
perhaps naively, thought that there should be a way to change fonts 
without modifying texinfo.tex.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.