[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#193444: helvetica produces dollar signs instead of \textsterling




LaTeX2e bug report.
Template generated by latexbug.tex on 2004/04/26

Reports may be submitted by email to latex-bugs@latex-project.org
Please use the subject line:
Subject: helvetica produces dollar signs instead of \textsterling

To follow up an existing report, include the bug reference, e.g.
"latex/1234: ", preceding the subject text.
============================================================

>Category: psnfss
>Synopsis: helvetica produces dollar signs instead of \textsterling
>Confidential: no
>Release: LaTeX2e <2001/06/01>
>Originator:  < 193444@bugs.debian.org >  ( < Debian teTeX maintenance team > )
>Organization: Debian Project
>Environment:
 Hyphenation: Babel <v3.7h> and hyphenation patterns for american, french, ngerman, nohyphenation, loaded.
 \@TeXversion: undefined (Standard setting for TeX3.141 and later)
 \@currdir: macro:->./
 \input@path: undefined (Standard setting)
>Unformatted:
 *** Initex configuration files
fonttext.cfg
 2001/06/04 v2.2z LaTeX Kernel (Uncustomised text font setup)
fonttext.ltx
 2001/06/04 v2.2z LaTeX Kernel (Text font setup)
omlenc.def
 2001/06/05 v1.94 Standard LaTeX file
t1enc.def
 2001/06/05 v1.94 Standard LaTeX file
ot1enc.def
 2001/06/05 v1.94 Standard LaTeX file
omsenc.def
 2001/06/05 v1.94 Standard LaTeX file
t1cmr.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
ot1cmr.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
ot1cmss.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
ot1cmtt.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
fontmath.cfg
 2001/06/04 v2.2z LaTeX Kernel (Uncustomised math font setup)
fontmath.ltx
 2001/06/04 v2.2z LaTeX Kernel (Math font setup)
omlcmm.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
omscmsy.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
omxcmex.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
ucmr.fd
 1999/05/25 v2.5h Standard LaTeX font definitions
preload.cfg
 2001/06/04 v2.2z LaTeX Kernel (Uncustomised preload font setup)
preload.ltx
 1998/08/17 v2.1g LaTeX Kernel (Font Preloading)
hyphen.cfg
 2001/03/01 v3.7h Babel language switching mechanism
 ***
>Description:
Description of bug:
 http://bugs.debian.org/193444

Here's further analysis.

The following test file produces incorrect results (slanted dollar
instead of slanted sterling) for the last two cases.  AFAIK, this is a
LaTeX bug distinct from the original bug I found, but it confirms I
know what's going on in general with the sterling and dollar glyphs.
The ways to fix it are the same as the ways described below for
Helvetica (i.e., create a new font cmssu10.mf and map cmss/m/ui to it
and so on, or add a kludge that redefines the commands to produce
sterling glyphs).

    \documentclass{article}
    \begin{document}

    roman: \pounds 1

    italic: {\itshape \pounds 2}

    slanted: {\slshape \pounds 3}

    sans-serif roman: {\sffamily \pounds 4}

    sans-serif italic: {\sffamily\itshape \pounds 5}

    sans-serif slanted: {\sffamily\slshape \pounds 6}

    \end{document}

The CM sans-serif upshape sterling is correct because of some font
substitutions set up specifically to cover the sterling/dollar issue.
For reference from my last email:

   dollar, roman:    upshape
   dollar, sl/it:    slshape
   sterling, roman:  itshape
   sterling, sl/it:  ui      (= "upright italic" otherwise, I think)

Here is a log of a source calling for CM sans-serif upshape sterling:

    LaTeX Font Warning: Font shape `OT1/cmss/m/ui' in size <10> not available
    (Font)              Font shape `OT1/cmr/m/ui' tried instead on input line 18.

What happens there?  \pounds -> \textsterling -> select ui shape ->
fall back from cmss/ui to cmr/ui -> glyph in position of '$', which is
correct (or at least reasonable: it's recognizably not a sans-serif
glyph, but it's the right symbol, a sterling not a dollar).

Here is the corresponding log for the Helvetica (PHV and \sffamily)
sterling:

    (/usr/share/texmf/tex/latex/psnfss/ot1phv.fd
    File: ot1phv.fd 2001/06/04 scalable font definitions for OT1/phv.
    )
    LaTeX Font Info:    Font shape `OT1/phv/m/ui' in size <10> not available
    (Font)              Font shape `OT1/phv/m/it' tried instead on input line 18.
    LaTeX Font Info:    Font shape `OT1/phv/m/it' in size <10> not available
    (Font)              Font shape `OT1/phv/m/sl' tried instead on input line 18.
     [1


What happens there?  \pounds -> \textsterling -> select ui shape ->
fall back from phv/ui to phv/it -> fall back from phv/it to phv/sl ->
glyph in position of '$', which is INcorrect (see referenced table at
top, it is the slanted/italic dollar glyph, as expected).

Helvetica defines n and sl; ui -> it -> sl.  We have only two OT1
"alphabets" (n and sl) whereas in CM we have four (n sl it ui).

To imitate CM, ot1phv.fd would need to define a mapping for two new
font files, which would have to be created.  Doing that seems to me to
be too much work and complication just to solve the dollar/sterling
problem.  So here is an alternative.  Don't touch ot1phv.fd and
instead redefine \pounds, \textsterling, \mathsterling, simply to
produce the right glyph from the PostScript-encoded font (or whatever
font files already exist and have the sterling and slanted-sterling
Helvetica glyphs in them -- if no such files exist and we have to
create them, we might as well duplicate the CM hack).  The
redefinitions would do \newfont if necessary (on first use in a file).
The majority of files do not use a sterling glyph and no extra work
will be done or resources used in these cases.  I've done this kind of
hack before many times to pull a single glyph out of a PostScript font
without messing around with different encodings.  All that messing
around gets easier as this software matures, but in this case I think
we go back to the bald kludge.  The CM system is a kludge itself, and
duplicating that kludge in Helvetica is more work than doing a new
simpler kludge.

I'll also try to see what other OT1 fonts have analogous problems and
I'll look to see how psnfss is assembled and built since one might be
able to correct the problem in one place for all affected psnfss
fonts.


>How-To-Repeat:
Sample file which indicates the problem:
========================================
\documentclass{article}
\begin{document}

roman: \pounds 1

italic: {\itshape \pounds 2}

slanted: {\slshape \pounds 3}

sans-serif roman: {\sffamily \pounds 4}

sans-serif italic: {\sffamily\itshape \pounds 5}

sans-serif slanted: {\sffamily\slshape \pounds 6}

\end{document}

The log file from running LaTeX on the sample:
==============================================
(/usr/share/texmf/tex/latex/psnfss/ot1phv.fd
    File: ot1phv.fd 2001/06/04 scalable font definitions for OT1/phv.
    )
    LaTeX Font Info:    Font shape `OT1/phv/m/ui' in size <10> not available
    (Font)              Font shape `OT1/phv/m/it' tried instead on input line 18.
    LaTeX Font Info:    Font shape `OT1/phv/m/it' in size <10> not available
    (Font)              Font shape `OT1/phv/m/sl' tried instead on input line 18.
     [1

============================================================

End of LaTeX2e bug report.
============================================================

-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie




Reply to: