Download it now!
Bug 39670 - FILEOPEN Writer mis-displays greek letters in symbol font importing docx
Summary: FILEOPEN Writer mis-displays greek letters in symbol font importing docx
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.3 release
Hardware: All Linux (All)
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 08:54 UTC by Christopher M. Penalver
Modified: 2012-05-08 10:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
TestOffice2008.docx (27.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2011-07-29 08:54 UTC, Christopher M. Penalver
Details
Screenshot of the sample document in LO 3.5.3.2 on MacOS X 10.6.8 (168.64 KB, image/png)
2012-05-08 02:52 UTC, Roman Eisele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher M. Penalver 2011-07-29 08:54:08 UTC
Created attachment 49722 [details]
TestOffice2008.docx

Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/815983

1) lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

2) apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.3.3-1ubuntu2
  Candidate: 1:3.3.3-1ubuntu2
  Version table:
 *** 1:3.3.3-1ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.3.2-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages
     1:3.3.2-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

3) What is expected to happen importing a MS Word 2008 for Mac .docx in LO Writer via the Terminal:

cd ~/Desktop && wget -c https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/815983/+attachment/2238809/+files/TestOffice2008.docx -O info.docx && lowriter -nologo info.docx

is the alpha and beta symbols show as it does in MS Word 2003 (11.5604.6505) or MS Word 2008 for Mac.

4) What happens instead is it does not display the symbols correctly.
Comment 1 tester8 2011-07-31 11:15:42 UTC
Not Reproduced with:

LO 3.4.2 OOO340m1 (Build:202)
Ubuntu 10.04.3 x86
Linux 2.6.32-33-generic Russian UI

Can you check it on LO3.4?
Comment 2 Christopher M. Penalver 2011-08-05 22:19:45 UTC
tester8, confirmed fixed in LibreOffice 3.4.2 OOO340m1 (Build:203), Microsoft Windows Vista Business 6.0.6002 Service Pack 2 Build 6002. Marking RESOLVED WORKSFORME.
Comment 3 Roman Eisele 2012-05-08 02:51:52 UTC
Sorry, but I have to open this bug again:
It is still or again reproducible on MacOS X (10.6.8). Testing with LibreOffice 3.5.3.2 (Build-ID: 235ab8a-3802056-4a8fed3-2d66ea8-e241b80), German langpack installed.

If I open the attached sample .docx file, the two mentioned Greek letters alpha and beta are not displayed, but some ornaments are visible instead. This happens even with Microsoft's Cambria + Cambria Math fonts installed.

I will attach a screenshot of how the document looks for me.
Comment 4 Roman Eisele 2012-05-08 02:52:47 UTC
Created attachment 61208 [details]
Screenshot of the sample document in LO 3.5.3.2 on MacOS X 10.6.8
Comment 5 Roman Eisele 2012-05-08 03:14:12 UTC
If I don't miss anything, the problematic DOCX section (from /word/document.xml) is:

<w:r><w:sym w:font="Symbol" w:char="F061"/></w:r><w:r><w:t xml:space="preserve">-alpha, </w:t></w:r><w:r><w:sym w:font="Symbol" w:char="F062"/></w:r><w:r><w:t>-beta.

I am no DOCX expert, but if I understand Microsoft's horrible file format right I see two interesting points:

* The w:font attribute is "Symbol" (not Cambria/Cambria Math as I would expect).
* The w:char has the value F061. If this is a Unicode code point it means that the two symbols alpha and beta are not Greek Unicode letters (would be U+03B1 and 03B2) nor from some math symbols range, but glyphs from the Private Use Area.

This is indeed strange. If Microsoft wants an alpha Glyph from the Symbol font, it should just use the Greek Unicode indices, which are correctly U+03B1 and 03B2, at least in my copy of the Symbol font. Also my copy of the Cambria Italic contain alpha and beta at the correct Unicode indices (I can't test Cambria Regular because it's a .TTC file which FontLab does not open). MS should not rely on PUA glyphs for important things like formula symbols. And there is just no U+F061 or F062 glyph in the Symbol font installed with MacOS X 10.6.8 ... (why should there be one?!).

Therefore, I'm not surprised about the two ornaments visible in the screenshot: they are just the glyphs associated with U+F061 and U+F062 in some font I have installed (Apple Chancery in my case). This is correct behaviour if the font used for the text does not contain any glyph associated with this Unicode code point.

But, what is really important: even if I blame MS for doing strange things, there is still a problem in LibreOffice, at least in the MacOS version. If the sample file looks right on Windows, there seems to be some mapping from the strange w:char="F061" to the right alpha Glyph. Therefore, we just need the same mapping to work on MacOS, too. (Or there are indeed U+F061 and F062 glyphs in the Symbol (or Cambria) font on Windows. Can someone tell us if this is true? But even if this is true, we need again some mapping of these glyphs on MacOS in order to display them correctly.)
Comment 6 Christopher M. Penalver 2012-05-08 03:16:00 UTC
Roman Eisele, please do not reopen this report. This report is about how a bug in 3.3 was fixed in the 3.4 branch. However, a regression has occurred between the 3.4 and 3.5 branch, which is a different bug. If you are having a problem in LibreOffice, please file a new report. Thank you for your understanding.
Comment 7 Roman Eisele 2012-05-08 04:24:05 UTC
(In reply to comment #6)
> Roman Eisele, please do not reopen this report. This report is about how a bug
> in 3.3 was fixed in the 3.4 branch. However, a regression has occurred between
> the 3.4 and 3.5 branch, which is a different bug. If you are having a problem
> in LibreOffice, please file a new report. Thank you for your understanding.

Thanks for your friendly advice. You forgot to reset the Platform picker.
Comment 8 Roman Eisele 2012-05-08 10:47:17 UTC
Hint: For the issue(s) I reported in comment #3 to comment #5, there is now the new bug 49645.

If you encounter some similar issues with LibreOffice 3.5 (or 3.6), please don't reopen this (present) bug report bug but refer to bug 49645 instead.