Bug 901858 - Symbols incorrectly displayed
Summary: Symbols incorrectly displayed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: wine
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 924872 (view as bug list)
Depends On:
Blocks: 923346
TreeView+ depends on / blocked
 
Reported: 2013-01-19 17:28 UTC by Richard Kennedy
Modified: 2014-10-06 18:07 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 923346 (view as bug list)
Environment:
Last Closed: 2014-10-06 18:07:11 UTC


Attachments (Terms of Use)
microchip pdf showing the fault (248.58 KB, application/pdf)
2013-01-19 17:28 UTC, Richard Kennedy
no flags Details
blacklist wine font Symbol (301 bytes, text/plain)
2013-03-05 12:26 UTC, Marek Kašík
no flags Details

Description Richard Kennedy 2013-01-19 17:28:11 UTC
Created attachment 683157 [details]
microchip pdf showing the fault

Description of problem:

When reading technical pdfs, the wrong symbols are displayed for some math characters. e.g. pi is displayed as not equal, ohms as a vertical bar, and micro (mu) is displayed as infinity.
   
Version-Release number of selected component (if applicable):

okular-4.9.5.-1.fc18

How reproducible:

Displaying a technical pdf such as 
http://ww1.microchip.com/downloads/en/AppNotes/00954A.pdf
shows the wrong symbols.
E.G. In figure 1 - the value for C2 is displayed as 470 (inf) F instead of 470 (mu) F

Steps to Reproduce:
1. Display technical pdf
2. 
3.
  
Actual results:
pi is displayed as not equals
ohms as a vertical bar
micro(mu) as infinity

Expected results:
The correct symbols should be displayed

Additional info:
Evince also has this problem, but emacs displays everything correctly.
This happens across a range of pdfs and I think is a serious bug than needs fixing as soon as possible,. It reflects badly on fedora if we cannot display technical specifications properly.

Comment 1 Kevin Kofler 2013-01-19 17:47:09 UTC
> Evince also has this problem

Reassigning to poppler, which is the common library used by both.


What I see is that this PDF does not embed its fonts, which means you get whatever fonts are installed on the system. In this case, Symbol is mapped to wine-symbol-fonts. So I'm not sure whether poppler or the font is doing the wrong thing there.

And by the way, the PDF is bad because it uses a font outside of the PostScript standard (Symbol) and doesn't embed it. A portable PDF MUST embed all the non-PostScript fonts it uses.

Comment 2 Richard Kennedy 2013-02-28 12:57:45 UTC
Just a quick update.

The new embedded pdf reader in Firefox 19 displays these files correctly too.

Well, the pdf may not be correct but it was created by adobe software & there are lots of them out in the wild, so we should do something to fix it.
Can I change the default font mapping for popper to something else ? If so how do I go about that?

Comment 3 Kevin Kofler 2013-03-01 00:00:01 UTC
As I said, it's a bug in either poppler or wine-symbol-fonts (or both). Unfortunately, the poppler maintainer hasn't answered so far.

Comment 4 Marek Kašík 2013-03-01 12:05:38 UTC
Hi,

this is a bug in wine-symbol-fonts package. The symbol.ttf font has wrong mapping.
For additional info see upstream bug http://bugs.winehq.org/show_bug.cgi?id=24099.
I'm reassigning this to wine.

Regards

Marek

Comment 5 Jason Tibbitts 2013-03-01 19:45:34 UTC
Wow, it's great news that this the cause is known, because I've been struggling with this for some time.  Unfortunately upstream bug report has been there for quite some time with no progress, so I'm not sure what chance we have of getting this fixed.  What would break by removing this font?  Can it be removed from the dependency list of the wine-fonts metapackage?

Comment 6 Kevin Kofler 2013-03-01 22:53:16 UTC
Would that really fix the issue? I don't think the symbols can be properly displayed if the font is entirely missing. I suspect there's no way around fixing the font.

Comment 7 Richard Kennedy 2013-03-02 16:50:34 UTC
I've just fixed the font following the steps in the wine bug 24099 and it works.
I only run one wine app, ltspice, and it still works after the fix, so it's all looking good. 

Both firefox & emacs can display these characters properly so they must be using some other font, but I don't know how to find out which one. But if we could find out can we swap the mapping to that?

Comment 8 Richard Kennedy 2013-03-02 18:29:50 UTC
Having thought about this some more, I think that is more likely that the bug really is that poppler isn't handling unicode characters properly.

I cut & pasted the failing mu character from evince into emacs, and it says it's unicode 0x3BC. So it seems that poppler tries to use the symbol font and 0x3BC
 is something different in there because it's broken too.

emacs and firefox somehow resolve the unicode character correctly and don't end up in the symbol font, but I haven't found out which font they do use.

I didn't realise all of this stuff was so involved and complex. At least fixing up the font is a temporary fix.

Comment 9 Kevin Kofler 2013-03-02 22:58:39 UTC
Maybe poppler shouldn't be looking up "Symbol" in fontconfig at all, but handle the Symbol font specially? The Window$ Symbol TTF font which WINE's font tries to emulate is a hack which predates Unicode and maps Greek letters and other symbol characters to plain 8-bit characters (0-255). Somebody should probably test what happens when you use the original M$ Symbol.ttf. If it has the same issue, it's not WINE's fault.

Comment 10 Richard Kennedy 2013-03-04 17:44:39 UTC
Just a couple of notes :-

* The poppler version here is 0.20.2 which was released on Tue July 10, 2012, and
the latest is 0.22.1 which contains quite a number of bug fixes.

* I've reset my machine to the default state and if I run pdftohtml on this file 
the correct characters are generated in the html. (pdftohtml is a poppler tool).

* Libre Office also can display these files correctly.

Is there any way to get poppler to use the opensymobol font to resolve these symbols? AFAICT opensymbol contains all of the correct unicode so might make a good replacement and it's already installed.

Comment 11 Marek Kašík 2013-03-05 12:26:52 UTC
Created attachment 705385 [details]
blacklist wine font Symbol

(In reply to comment #10)
> Just a couple of notes :-
> 
> * The poppler version here is 0.20.2 which was released on Tue July 10,
> 2012, and
> the latest is 0.22.1 which contains quite a number of bug fixes.

The poppler-0.22.1 doesn't fix this.


> * I've reset my machine to the default state and if I run pdftohtml on this
> file 
> the correct characters are generated in the html. (pdftohtml is a poppler
> tool).

It generates correct html because the codes for those characters are correct in the pdf.


> * Libre Office also can display these files correctly.

Do you mean the html or the pdf? Libre Office displays me the same characters as poppler when importing the pdf.


> Is there any way to get poppler to use the opensymobol font to resolve these
> symbols? AFAICT opensymbol contains all of the correct unicode so might make
> a good replacement and it's already installed.

Place the attached file to ~/.config/fontconfig/fonts.conf. This will blacklist the font for all applications which use fontconfig (useful when the wine-symbol-fonts is a dependency of a package which you don't want to remove).

I've tried to view a file with the character for the micro sign (UTF-8 code 0xC2B5) in notepad which is part of wine-common. After switching the font to "Symbol", it showed me the incorrect symbol. I guess that there is really something wrong with the font.

Regards

Marek

Comment 12 Kevin Kofler 2013-03-05 15:00:50 UTC
The problem is that the Symbol font was designed in a way that the 'm' character is displayed as 'µ', and 'µ' is not mapped to anything. In fact, Symbol was the way to get those special characters in old software which didn't support Unicode. I don't know whether it's possible to fix this issue without breaking that old software when people try to run it under WINE. I hope it's possible, but I'm not sure. The WINE upstream bug report has a proposed fix, but I don't know whether that fix doesn't break the non-Unicode apps.

Comment 13 Andreas Bierfert 2013-03-05 19:55:02 UTC
Well as a workaround we could confine wine symbol to wine for now (like with tahoma). This would reduce the problem to wine applications. 

Before resorting to this I will investigate a bit...

Comment 14 Marek Kašík 2013-04-09 13:55:25 UTC
*** Bug 924872 has been marked as a duplicate of this bug. ***

Comment 15 Fedora End Of Life 2013-12-21 15:18:29 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Michael Cronenworth 2014-10-06 16:18:15 UTC
Since wine fonts are no longer installed system-wide by default this issue should be resolved... Is anyone still having issues?

Comment 17 Jason Tibbitts 2014-10-06 17:11:46 UTC
I haven't seen this one in a while.


Note You need to log in before you can comment on or make changes to this bug.