Improper encoding of the "Symbol" font

Bug #789479 reported by Stefan Löffler
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wine
New
Medium
poppler (Ubuntu)
Invalid
Undecided
Unassigned
wine1.2 (Ubuntu)
Fix Released
Undecided
Unassigned
wine1.3 (Ubuntu)
Fix Released
Undecided
Scott Ritchie

Bug Description

The characters 'm' and 'p' are mapped to wrong glphys in the base-14 font "Symbol". This problem has not occurred in maverick.

I'm attaching a pdf-file that uses all base-14 fonts without embedding them, and screenshots from maverick and natty. Note the differences in the 5th word in the "Symbol" line. The screenshots were made in TeXworks which is based on poppler-qt4 (evince in natty gives the same result as TeXworks, but I don't have a maverick-screenshot of it at hand).

$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

$apt-cache policy libpoppler-qt4-3
libpoppler-qt4-3:
  Installed: 0.16.4-0ubuntu1.1
  Candidate: 0.16.4-0ubuntu1.1
  Version table:
 *** 0.16.4-0ubuntu1.1 0
        500 http://gd.tuwien.ac.at/opsys/linux/ubuntu/archive/ natty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.16.4-0ubuntu1 0
        500 http://gd.tuwien.ac.at/opsys/linux/ubuntu/archive/ natty/main amd64 Packages

Revision history for this message
In , Jack Leigh (leighman) wrote :

from https://bugs.launchpad.net/ubuntu/+source/wine1.2/+bug/461233

When I open this pdf (attached) with evince, some formulas are rendered incorrectly (eg. p. 71). This also happens in Okular.
Confirmed here wine 1.3.

see also https://bugs.edge.launchpad.net/ubuntu/+source/wine1.2/+bug/605670

Revision history for this message
In , Jack Leigh (leighman) wrote :
Revision history for this message
In , Removed by request (removed1836289) wrote :

For the record, because this bug description is completely confusing:

"""
launchpad:
reassigning to the wine1.2 package (which produces the ttf-symbol-replacement deb)
"""

Apparently, the symbol font produced by wine contains some incorrect glyphs, such as sigma.

Revision history for this message
In , Dmitry-baikal (dmitry-baikal) wrote :

What Windows application is this bug about? How to reproduce the problem
with a win32 app?

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #3)
> What Windows application is this bug about? How to reproduce the problem
> with a win32 app?

This is an issue with fonts/symbol.ttf, which ubuntu uses to create the ttf-symbol-replacement package. From what I understand anyway...

Revision history for this message
In , Dmitry-baikal (dmitry-baikal) wrote :

(In reply to comment #4)
> > What Windows application is this bug about? How to reproduce the problem
> > with a win32 app?
>
> This is an issue with fonts/symbol.ttf, which ubuntu uses to create the
> ttf-symbol-replacement package. From what I understand anyway...

It would be helpful to at least describe what exactly the problem is,
and how to reproduce it.

Revision history for this message
In , Jack Leigh (leighman) wrote :

Several users report that when this font is installed by wine some symbols (such as the sigma on p. 71 of the pdf) in pdfs viewed in Evince and Okular (native Linux apps) are incorrectly displayed.

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #3)
> What Windows application is this bug about? How to reproduce the problem
> with a win32 app?

It's easy to see in native evince with:
wget http://www.fairchildsemi.com/ds/CD%2FCD4066BC.pdf
sudo apt-get install ttf-symbol-replacement
evince CD_CD4066BC.pdf

there are comparison screenshots on launchpad:
http://launchpadlibrarian.net/51948181/screenshot-OK.png
http://launchpadlibrarian.net/51948191/screenshot-wrong.png

I tried with a windows version of evince, but it doesn't have the problem (though it does crash because of missing helvetica).

Revision history for this message
In , Dmitry-baikal (dmitry-baikal) wrote :

*** Bug 24731 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Wbreyha (wbreyha) wrote :

Opening the symbol.ttf in fontforge (lots of warnings) and decoding it with ttx shows that the unicode mappings (cmap_format_4) are messed up in this font.

I was able to "repair" it with fontforge with the following steps:

*) open symbol.ttf
*) Encoding->Force Encoding->Symbol
*) Encoding->Reencode->Macintosh Latin
*) File->Generate Fonts... (ignore warnings and save)

Then
*) remove symbol.ttf from whereever it was installed
*) call "fc-cache" as root (-v if you like)
*) copy the new symbol.ttf saved with fontforge to the old path
*) restart the application which displayed the damaged symbols

My "pi" bug 24731 is fixed then.

Revision history for this message
In , Roman (m01brv) wrote :

Indeed, the issue is with the unicode encoding. In my case, e.g., the degree sign (U+00B0) was rendered as uppercase Upsilon which is wrongly mapped in the wine's Symbol font by the same code. And wine's unicode code for the degree symbol is U+221e, which normally refers to the math infinity sign.

I think it would be great if this font was somehow prevented to override other system fonts for native linux applications, even after the unicode mismatch issue is corrected. Why my usual linux apps should be forced to use a wine's font?

Revision history for this message
Stefan Löffler (st.loeffler) wrote :
Revision history for this message
Stefan Löffler (st.loeffler) wrote :
Revision history for this message
Stefan Löffler (st.loeffler) wrote :
Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Thank you for your bug report. I can reproduce this problem (in Natty), but the culprit seems to be the ttf-symbol-replacement package from wine 1.2 and not poppler -- can you confirm that the symbols are displayed correctly when you uninstall ttf-symbol-replacement?

Changed in poppler (Ubuntu):
status: New → Incomplete
Revision history for this message
Stefan Löffler (st.loeffler) wrote :

Yes, uninstalling ttf-symbol-replacement solves this issue. Note that I have wine1.3 installed. I added both wine1.2 and wine1.3 to this issue.

Still, I wonder why poppler picks a font from wine over Symbol.pfb. Shouldn't "system" gs fonts take precedence over ports from Windows provided by wine? Maybe this is a fontconfig issue as well?

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

I'm invalidating the poppler bug, then. I think both fonts get exactly the same score when matching with fc-match -- AFAIK fontconfig does not use any priorities but just matches according to the font properties (the same for both fonts). I'm not sure whether this is a bug or not.
And yes, both ttf-symbol-replacement and ttf-symbol-replacement-wine1.3 have this problem (the versions did not change yet in Oneiric, so the issue also still exists there).

Changed in poppler (Ubuntu):
status: Incomplete → Invalid
Changed in wine1.2 (Ubuntu):
status: New → Confirmed
Changed in wine1.3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

There is already an upstream bug about the issue, so someone with the appropriate rights could mark this bug as Triaged. The upstream bug: http://bugs.winehq.org/show_bug.cgi?id=24099

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

And a final comment: Bug 162111 links to the same upstream bug, although at least the OP's initially reported problem is not obviously the same (it involves a lot of missing glyphs instead of wrong ones).

Changed in wine:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Scott Ritchie (scottritchie) wrote :

It would be possible to just, at the packaging layer, return the symbol font to be Wine only. But it would probably be better to fix it.

It's also possible to lower the symbol replacement font priority.

Changed in wine1.2 (Ubuntu):
status: Confirmed → Triaged
Changed in wine1.3 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Scott Ritchie (scottritchie) wrote :

I'm doing a new Wine upload now, so Wine and its font will be rebuilt, so some further testing would be appreciated. Specifically:

In oneiric:

1) Is the issue still there with wine1.3 1.3.28?
2) Is ttf-symbol-replacement-wine1.3 still the same issue as ttf-symbol-replacement ?
3) If Maverick worked and Natty didn't, then what happens if you install the maverick ttf-symbol-replacement package into Natty/Oneiric?

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Actually it seems like the font is still broken and there are better replacements installed by default so I'm just gonna remove it from the package entirely like I did with Tahoma replacement.

Changed in wine1.3 (Ubuntu):
assignee: nobody → Scott Ritchie (scottritchie)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.3 - 1.3.28-0ubuntu1

---------------
wine1.3 (1.3.28-0ubuntu1) oneiric; urgency=low

  * New upstream release (LP: #828547)
    - Many changes over past cycle, many more apps should work
  * Remove ttf-symbol-replacement-wine1.3 package (LP: #789479)
    - Symbol replacement font is buggy and has better alternatives
    - Will remain internal to Wine package for Wine use only
  * debian/control:
    - Apply wrap-and-sort to cleanup lists of dependencies
    - remove libjack-dev, libaudio-dev, libesd0-dev because
      Jack, NAS, and ESD audio servers have been removed
    - Remove gcc-4.5-multilib build-dep and use latest GCC
    - Add oss4-dev to build with OSS4 support
    - Remove lib32stdc++6, not needed
    - Recommend wine-gecko >= 1.3
    - Add breaks/replaces for symbol-replacement
  * debian/rules:
    - Remove gcc-4.5 specification and use default GCC (now 4.6)
  * Update debian/watch (thanks Matthew Young) (LP: #839107)
  * Drop dummy-thread patch
    - Not upstream, doesn't allow install CS4 to finish anyway
 -- Scott Ritchie <email address hidden> Tue, 13 Sep 2011 15:34:48 -0700

Changed in wine1.3 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.2.3-0ubuntu1

---------------
wine1.2 (1.2.3-0ubuntu1) oneiric; urgency=low

  * New upstream release (LP: #771769)
    - Translation updates.
    - Various bug fixes.
  * Remove ttf-symbol-replacement package (LP: #162111, #789479)
  * Wine meta package now installs wine1.3
  * debian/control:
    - Remove unused libstdc++ from build deps
    - Apply wrap-and-sort to put build deps on individual lines
    - breaks/replaces on ttf-symbol-replacement
  * Remove unused pgo.tar.coded in source package
 -- Scott Ritchie <email address hidden> Mon, 19 Sep 2011 14:12:05 -0700

Changed in wine1.2 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , Winehq-f (winehq-f) wrote :

This bug still exists in Wine 1.3.29 and yet there has been no activity on it for a year. Is anyone looking into it? The symbols.ttf font has a long list of incorrect mappings, and since the Ubuntu packages install this font as the default Symbols font for the entire system, it affects many programs, at least on Ubuntu. I suspect the same may be true for many other distributions.

Where did this font come from? Was it created by the Wine project? If so, can it please be fixed? If not, then who created it and can we get them to fix it?

If none of this is possible, then can it at least not be installed as the default Symbols font for the entire OS?

I'd also say this bug can be confirmed, and the importance upgraded a little.

Revision history for this message
In , Winehq-f (winehq-f) wrote :

Here is a partial list of incorrect mappings in symbols.ttf (this is just from the "Mathematical Operators" Unicode block:

0x2206 INCREMENT (displayed as an empty set symbol)
0x220f N-ARY PRODUCT (displayed as a division operator)
0x2211 N-ARY SUMMATION (displayed as a filled circle)
0x221a SQUARE ROOT (displayed as a squiggle)
0x221e INFINITY (displayed as an open circle)
0x222b INTEGRAL (displayed as three stacked horizontal bars)
0x2248 ALMOST EQUAL TO (displayed as a circled plus sign)
0x2260 NOT EQUAL TO (displayed as an up arrow)
0x2264 LESS-THAN OR EQUAL TO (displayed as a double quote)

Like I said, this is just from the "Mathematical Operators" block, I didn't check any other blocks, although we know there must be other blocks involved since the bullet symbol at least is also wrong and that is in the "General Punctuation" block. This is just to demonstrate the extent of the problem.

Revision history for this message
In , Marcel Stimberg (marcelstimberg) wrote :

The issue has been recently fixed in Ubuntu (i.e. in Ubuntu 11.10 (Oneiric)) by removing the font from the wine package. The changelogs for both, wine1.2 and wine1.3 mention:
 * Remove ttf-symbol-replacement package

Revision history for this message
In , PJBrs (pjbeers) wrote :

I can confirm for wine-3.0.

I just overwrote the wine font with its Microsoft counterparts, and now bullets in pdf documents no longer appear as infinity signs.

Revision history for this message
In , PJBrs (pjbeers) wrote :

Oops, copying the microsoft file does not fix the fonts. Sorry for the spam!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.