Bug 193916

Summary: okular doesn't respect font type in odt documents
Product: [Applications] okular Reporter: Kamil Neczaj <kneczaj>
Component: ODT backendAssignee: Okular developers <okular-devel>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: aacid, danconn, justin.zobel, oliver.sander
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: the document
Resume with font problems.
OpenOffice vs Okular visualization comparison

Description Kamil Neczaj 2009-05-24 17:35:15 UTC
Version:            (using KDE 4.2.3)
OS:                Linux
Installed from:    Unlisted Binary Package

Attached document was made using openoffice.org. There are several types of fonts, but okular renders all text using sans serif and bigger size than openoffice.
Comment 1 Kamil Neczaj 2009-05-24 17:35:49 UTC
Created attachment 33977 [details]
the document
Comment 2 Pino Toscano 2009-05-24 19:37:25 UTC
I can reproduce the missing font face, but not the different sizes, which look basically the same when looking the document in both oowriter and okular at the same zoom level.
Comment 3 Kamil Neczaj 2009-05-25 18:28:33 UTC
Yes, you're right. Now I know why fonts seemed smaller for me. Try to open this document in openoffice and okular. In okular the page is smaller than in openoffice using same zoom, but font size is ok.
Comment 4 Pino Toscano 2009-05-26 16:19:15 UTC
SVN commit 973180 by pino:

read the font-style property of styles
CCBUG: 193916


 M  +13 -2     formatproperty.cpp  
 M  +2 -0      formatproperty.h  
 M  +11 -0     styleparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973180
Comment 5 Pino Toscano 2009-05-26 16:50:35 UTC
SVN commit 973209 by pino:

properly calculate the page size, converting from points to pixels using the current screen dpi
CCBUG: 171463
CCBUG: 193916
also, it seems to fix the crash of testcase documents in #193542 (not that the resulting quality when open is that good...)
BUG: 193542


 M  +3 -1      converter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973209
Comment 6 Pino Toscano 2009-05-26 17:02:18 UTC
SVN commit 973214 by pino:

backport: read the font-style property of styles
CCBUG: 193916


 M  +13 -2     formatproperty.cpp  
 M  +2 -0      formatproperty.h  
 M  +11 -0     styleparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973214
Comment 7 Pino Toscano 2009-05-26 17:04:59 UTC
SVN commit 973216 by pino:

backport: properly calculate the page size, converting from points to pixels using the current screen dpi
CCBUG: 171463
CCBUG: 193916
CCBUG: 193542


 M  +3 -1      converter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973216
Comment 8 Kamil Neczaj 2009-05-27 00:30:05 UTC
notice that okular render italics fonts as regular.
Comment 9 Kamil Neczaj 2009-05-27 00:35:37 UTC
Should I open another bug report for numeration issue in this document?
Comment 10 Pino Toscano 2009-05-29 16:27:28 UTC
> notice that okular render italics fonts as regular.

Note that I did other commits related to this. If you are using the SVN version, I suggest to update.

> Should I open another bug report for numeration issue in this document?

Better open a new report, as it represents a different issue. (Note that you don't need to reattach the document, just provide a link to the one of this bug.)
Comment 11 Kamil Neczaj 2009-06-03 10:48:50 UTC
There are still issues with fonts:
- the all document is write using dejavu serif whereas okular renders dejavu sans
- okular renders words stroked out (in the last page) using regular font style without strikeout.
Comment 12 Dan Connor 2009-07-15 20:41:06 UTC
Created attachment 35362 [details]
Resume with font problems.

Note dashes are not rendered in Okular 4.2.96
Comment 13 Dan Connor 2009-07-15 20:41:51 UTC
I'm going to chime in here and suggest the Okular has some problems interpreting fonts from other FOSS applications.  I attached my resume, created in Inkscape and printed to PDF using Ubuntu 9.04 and KDE 4.3 RC2.  In Ubuntu's Evince everything looks as it should but in Okular, dashes in the font I'm using (Agenda Light) do not appear.

"I seek to contribute to a creative and highly collaborative environment - one that will be conducive to both to personal growth and to quality work."

No dash in Okular, dash in Evince.
Comment 14 Brad Hards 2009-07-16 01:31:24 UTC
Dan Connor

This bug is about fonts in ODT documents, not in PDF documents. In any case, your dash shows up fine for me using poppler 0.10.5 (on Fedora 11). Note that okular doesn't do the rendering of PDF documents - that is done by poppler. 

Brad
Comment 15 Dan Connor 2009-07-16 01:45:55 UTC
Ah, I guess I didn't realize Okular had several back-ends.  Thanks for taking the time to check out my PDF.  I'm using the same version of Poppler as you, I believe.
Comment 16 Radko Dinev 2010-06-19 10:27:40 UTC
There are *a lot* of problems visualizing ODT documents:
1. Font faces are rendered (original ODT document uses Georgia and Symbol). Georgia is rendered using some sans-serif font, while Symbol characters do not visualize properly at all, showing some unreadable characters instead.
2) Subscript and superscript are all shown as normal case characters in the baseline.
3) Table in the bottom is with "No border" option and it doesn't show in OO, when exported to PDF or when printed. However Okular displays an ugly HTML-unstyled-default-table-view-like table. Also note that in the table Okular inserts some new lines between text lines which aren't originally present.

See attached screenshot.

Basically the Okular visualization vaguely reminds me the document I made - it kind of transforms it to another document :)

Using:
Kubuntu Lucid 10.04 LTS
KDE 4.4.4.
Okular 0.10.4 with Open Office Document Backend 0.2.2 (debian package version 4:4.4.4-0ubuntu1~lucid1~ppa1).
Open Office.org Writer 3.2.0 (OOO320m12, build 9483) (debian package version 1:3.2.0-7ubuntu4.1).
Comment 17 Radko Dinev 2010-06-19 10:28:43 UTC
Created attachment 48131 [details]
OpenOffice vs Okular visualization comparison
Comment 18 Kamil Neczaj 2012-04-06 14:36:06 UTC
I propose to throw out odt documents from okular's desktop file, section MimeType. ODT preview is done quite makeshift and no one would fix it. It is better to not provide user with functionality which has really poor quality because it influences opinion about overall kde, especially if in some distributions okular would have been the default ODT reader above LibreOffice.
Comment 19 Albert Astals Cid 2012-04-06 14:59:33 UTC
Complain to those distributions preference settings.
Comment 20 Justin Zobel 2020-11-29 21:25:13 UTC
(In reply to Albert Astals Cid from comment #19)
> Complain to those distributions preference settings.

Albert does this mean this can be resolved as a downstream issue?
Comment 21 Oliver Sander 2020-11-30 05:15:47 UTC
Closing, because the odt backend has been removed completely.

(Not sure what the correct bug resolution is, though).