Bug 662159

Summary: Palatino displays with ligatures on 2, 4, 5, 6 and 9 (figbas plrj.pfb from Tex)
Product: [openSUSE] openSUSE 11.3 Reporter: andrew cooke <andrew>
Component: OtherAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: rdtennent, sndirsch
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Screenshot of the above, with source edited to include digits 1-9

Description andrew cooke 2011-01-03 22:36:38 UTC
Created attachment 406810 [details]
Screenshot of the above, with source edited to include digits 1-9

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10

Web pages that include digits in the Palatino font display with unusual ligatures.  I will include a screenshot.

It turns out that the file /usr/share/texmf/fonts/type1/public/figbas/plrj.pfb which is a specialised font for "figured-bass notation in baroque music" is being used as Palatino (it should modiy Palatino to give a dedicated, obscure font that no-one except early music freaks will ever use).

For more details see https://www.quora.com/Typefaces/Why-is-Palatino-displaying-2-with-a-vertical-line-that-makes-it-look-like-4 (you will need to click on "more" to see all the information).

Reproducible: Always

Steps to Reproduce:
1. make sure that Latex is installed
2. view a web page like http://www.satine.org/archives/2011/01/01/the-care-and-feeding-of-the-android-gpu/ that includes Palatino
3. you should see something like the enclosed screenshot fragment.
Actual Results:  
The numbers 2,4,5,6 and 9 have additional ligatures.

Expected Results:  
Th eligatures should not be present.

As far as I know my setup is standard, yet I can find no evidence that anyone else has seen this bug.  Please see the Quora link for more details.
Comment 1 Stefan Dirsch 2011-01-04 13:19:28 UTC
I can see that issue when displaying the font with

 xfd -fn "-urw-palatino-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific"

after creating fonts.dir/fonts.scale via mkfontscale/mkfontdir and running 'xset fp rehash' afterwards.

I also see the issue with

 xfd -fa "Palatino"

after creating the fontconfig cache with fc-cache. Apparently the font only contains the numbers 2,4,5,6 and 9. Could it be that the font is already broken
and not the rendering?
Comment 2 andrew cooke 2011-01-04 13:25:00 UTC
My limited understanding from http://cg.scs.carleton.ca/~luc/tex.html is that this is what the font is supposed to do, but that those digits should be in the font named FiguredBassPalatino rather than Palatino.

In other words, the plrj font is something like a "patch" that extends Palatino to add these digits.

But I really don't understand fonts in detail.  Note that there are other fonts (cmrj, cmssj) which should do the same to CMR and CMRSS - maybe checking if those work (they should give FiguredBassComputerModern, FiguredBassComputerModernSans) would help?
Comment 3 andrew cooke 2011-01-04 13:25:53 UTC
(So what I am trying to say is that it's not exactly the font that's broken. but the name of the result)
Comment 4 andrew cooke 2011-01-04 13:52:24 UTC
Sorry, I just understood what you are saying, I think.

If this is defining *ligatures* for the character combination "2+" why is it being displayed for "2"?  And I imagine it could be a problem with either the font or rendering.

Sorry I am not more help (I can't even see this any more - I deleted the file and rebuilt my fonts to remove the mess).
Comment 5 Stefan Dirsch 2011-01-04 15:02:05 UTC
My guess is that the font meta data is wrong.

# fc-query plrj.pfb 
Pattern has 15 elts (size 16)
        family: "Palatino"(s)
        style: "Medium"(s)
        [...]

# fc-query cmssj.pfb 
Pattern has 15 elts (size 16)
        family: "ComputerModernSans"(s)
        style: "Medium"(s)
        [...]

# fc-query cmrj.pfb 
Pattern has 15 elts (size 16)
        family: "ComputerModern"(s)
        style: "Medium"(s)
        [...]

Hence reassigning to Werner.
Comment 6 Stefan Dirsch 2011-01-04 22:28:53 UTC
(In reply to comment #4)
> If this is defining *ligatures* for the character combination "2+" why is it
> being displayed for "2"?  And I imagine it could be a problem with either the
> font or rendering.

These special glyphs for 2,4,5.6 and 9 are at the regular position of 2,4,5,6 and 9. Compare with "xfd -fn fixed".
Comment 7 andrew cooke 2011-01-04 22:30:21 UTC
Ah, OK, so that sounds just wrong.  Thanks.
Comment 8 Dr. Werner Fink 2011-01-10 14:13:25 UTC
I'll not gone to fix this as I'm only the maintainer of TeXLive, please
report this issue upstream.  Otherrwise the tex fonts of upstream and
opensuse will differ which is not what I want.
Comment 9 andrew cooke 2011-01-10 14:18:03 UTC
OK, so if it's too much effort for you to report "upstream" can you at least explain who I need to report this to?
Comment 10 Dr. Werner Fink 2011-01-10 14:55:06 UTC
You may use tex-live@tug.org (the mail address of Young  Ryu I'm not knowing).

On the other hand you may disable Type1 fonts from TeXLive for the X11 Window
System, that is you may comment out the lines

  /usr/share/texmf/fonts/type1

and

  /usr/local/share/texmf/fonts/type1

by surrounding them with <!-- ... --> pairs in /etc/fonts/conf.d/09-texlive.conf
or simply remove those lines. For the next release of texlive I've already
splitted off this part.
Comment 12 Dr. Werner Fink 2011-01-10 16:12:48 UTC
Thanks a lot, let's see what happens.
Comment 13 Stefan Dirsch 2011-01-10 16:14:06 UTC
Thanks, Werner for fixing that issue for openSuSE 11.4. "Upstream" is pretty clear, that these fonts are not supposed to be used by fontconfig at all.
Comment 14 Stefan Dirsch 2011-01-10 16:15:01 UTC
(In reply to comment #12)
> Thanks a lot, let's see what happens.

https://www.tug.org/pipermail/tex-live/2011-January/028358.html

I believe that's all we need to know.
Comment 15 Dr. Werner Fink 2011-01-10 16:21:03 UTC
For 11.4 this should not happen anymore, see comment #10.
Comment 16 Bob Tennent 2011-01-10 17:29:05 UTC
I'm the developer of the figbas fonts. The information in the .pfb file
says that the Fontname is FiguredBassPalatino and the Family Name is
Palatino. It seems that SUSE is using this font for rendering digits.
I'm not familiar with how SUSE selects fonts but I think this is their
issue. As far as I know, the font information is correct; if not I'll
change it but I'll need authoritative guidance.

Bob Tennent
Comment 17 Bob Tennent 2011-01-10 19:51:15 UTC
I've changed the Postscript Fontnames to avoid conflicts with Palatino (and avoid trademark issues).  The revised figbas package has been submitted to CTAN. The TeXLive package will in due course be updated.

Thanks Andrew for reporting the problem.