Download it now!
Bug 77830 - slanted text face for imported PDF Draw text box objects becomes italic on roundtrip
Summary: slanted text face for imported PDF Draw text box objects becomes italic on ro...
Status: RESOLVED DUPLICATE of bug 105298
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2014-04-23 19:30 UTC by Alexandr
Modified: 2019-07-04 12:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Original pdf (42.44 KB, application/pdf)
2014-04-23 19:30 UTC, Alexandr
Details
After roundtrip (10.74 KB, application/pdf)
2014-04-23 19:32 UTC, Alexandr
Details
Computer Modern font from TeX Live (173.36 KB, application/x-7z-compressed)
2014-07-13 18:11 UTC, Alexandr
Details
TrueType Computer Modern created by FontForge (43.34 KB, application/x-7z-compressed)
2014-07-13 18:13 UTC, Alexandr
Details
Screenshot showing the character dialogue (65.95 KB, image/png)
2015-09-13 12:39 UTC, RGB
Details
XCharter LO fonts - example PDF (77.34 KB, application/pdf)
2019-02-14 23:19 UTC, LibreTraining
Details
XCharter-LO-fonts_2019-02-14 - ZIP file (703.07 KB, application/zip)
2019-02-14 23:22 UTC, LibreTraining
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr 2014-04-23 19:30:17 UTC
Created attachment 97827 [details]
Original pdf

LaTeX supports different font properties: slanted and italic, but LibreOffice makes them the same.

Steps to reproduce:
1. Open the example pdf with LibreOffice Draw
2. Export it as pdf
3. Compare the result with the original

The example pdf file was created from TeX source (see attachment 96230 [details] for bug 76500) by pdflatex.

I test the issue with LibreOffice 4.1.4.2 and 4.3.0.0.alpha1+ Build ID: b166e7af2bc3f6750b1f56adf004a115229d4c2d TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-04-22_05:17:38 on Debian x86_64

As far as I understand LibreOffice does not support slanted font property. If it is too difficult to add it, at least preserve the property to let make small changes without document corruption.

For testing the case, make sure that you have “Computer modern” font installed (see bug 76500)
Comment 1 Alexandr 2014-04-23 19:32:01 UTC
Created attachment 97828 [details]
After roundtrip
Comment 2 Jean-Baptiste Faure 2014-06-22 20:17:41 UTC
The font used in the original pdf is "Computer Modern". This font is not installed on my Ubuntu and LibreOffice replace it by an available near font. Do you have it on your system?
Please could you make a pdf test file with a more common font in order to eliminate the possibility of a problem linked to this font?

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided the requested informations. Thank you for your understanding.

Best regards. JBF
Comment 3 Alexandr 2014-07-13 18:11:39 UTC
Created attachment 102716 [details]
Computer Modern font from TeX Live

Hello.
I am sorry for delay. LaTeX uses its own fonts and I have no idea how make it use more common font. I attach “Computer modern” font from TeXlive and its TrueType version which I created with FontForge, File names means:
cmr – normar
cmbx – boldface
cmsl – slanted
cmti – italic

The result depends (at least in Window 7) on font installation order. If cmti have been installed before cmsl, both slanted and italic text are shown as italic. 
Both cmti and cmsl are mark as italic typeface of Computer Modern. Maybe LibreOffice can not correctly work if one font typeface have different variants.
Comment 4 Alexandr 2014-07-13 18:13:00 UTC
Created attachment 102717 [details]
TrueType Computer Modern created by FontForge
Comment 5 Joel Madero 2014-07-27 02:27:04 UTC
Confirmed:
Ubuntu 14.04 x64
LibreOffice 4.4
Build Date: Mon Jul 21 13:38:10 2014 -0400

New - confirmed

Thanks for reporting
Comment 6 QA Administrators 2015-09-04 02:49:04 UTC Comment hidden (obsolete)
Comment 7 RGB 2015-09-13 12:33:47 UTC
I changed product to "LibreOffice" (affects all parts of the suite) and "inherited from OOo" (it was always this way).

Install this font on your system:

http://www.ctan.org/tex-archive/fonts/erewhon/opentype

As you can see, it offers "italic" and "slanted" variants. Slanted and italics are two different things on typography, the first one being just a tilted (slanted, in fact) version of the regular font and the second one providing a more "rounded", unique design. 

LibO is confounded by this two variants and only shows one of them: in fact, the UI offers "italics" but instead gives you the "slanted" version. 

Tested on LibO 5.0.1.2 on Linux (openSUSE 13.2, 64 bits, KDE 4.14.9 with Spanish locale) with official LibO binaries.
Comment 8 RGB 2015-09-13 12:39:11 UTC
Created attachment 118666 [details]
Screenshot showing the character dialogue

On the screenshot you can see that only "regular", "italics", "bold" and "bold italics" are offered for erewhon typeface, and that the "italics" gives in fact the "slanted" variant so we have two errors here.
Comment 9 QA Administrators 2016-09-20 10:32:11 UTC Comment hidden (obsolete)
Comment 10 RGB 2017-07-02 20:07:54 UTC
The problem of LibO not being able to tell apart italic from slanted variants is still present on 5.3.4.2

Another font to play with:

http://www.ctan.org/pkg/xcharter

To add more information: there is a command line application on Linux, otfinfo, that provides information about OpenType fonts. With the "-i" flag you get things like font family, shape, etc.

otfinfo -i XCharter-Italic.otf

Family:              XCharter
Subfamily:           Italic
Full name:           XCharter Italic
PostScript name:     XCharter-Italic
etc.

otfinfo -i XCharter-Slanted.otf

Family:              XCharter
Subfamily:           Slanted
Full name:           XCharter Slanted
PostScript name:     XCharter-Slanted
etc.

But LibO offers 4, not 6, variants, calling "italic" the slanted version. The only workaround to get true italics is to delete the slanted files. But then, of course, you cannot use the slanted versions.
Comment 11 QA Administrators 2018-07-03 02:39:31 UTC Comment hidden (obsolete)
Comment 12 RGB 2018-07-03 16:09:43 UTC
Problem still present in LibO 6.0.5.2
Comment 13 LibreTraining 2019-02-14 23:19:05 UTC
Created attachment 149301 [details]
XCharter LO fonts - example PDF


The problems with the XCharter fonts is how the font family names and style groups are configured. Both the italic fonts and the slanted font are configured as italic in the same style group. This confuses LO - and any other older app using style groups (R/I/B/BI).

This PDF shows a modified (fixed) version of the fonts working properly in LibreOffice on Windows.

The fonts are in the ZIP attachment below.
Please test on Linux.


Note: This is the same issue with the Erewhon fonts - a modified/fixed version works fine.
Comment 14 LibreTraining 2019-02-14 23:22:18 UTC
Created attachment 149302 [details]
XCharter-LO-fonts_2019-02-14 - ZIP file

 
These are modified fonts which work properly in LibreOffice on Windows.

Please test in LibreOffice on Linux.
Comment 15 V Stuart Foote 2019-07-04 04:23:57 UTC
Issue of OP here, mishandling of italic vs. slanted faces of Computer Modern when both are present on system is not from the PDF print/export filter, nor form the poppler based PDF import filter.

So this is not a PDF filter issue. Rather, the issue is cross platform and is a font handling limitation. Closing as duplicate of bug 105298, or as in see also bug 35538 and its os specific font mishandlings.

Would note that our other PDF insertion filter, pdfium based, correctly renders the subset glyphs per font style to document canvas--but fails even more so when text runs of the Draw  graphic object get a 'break' apart.

PDF "touch-up" with LibreOffice will always be a losing proposition, and why we provide our "hybrid" PDF with an embedded ODF stream.

*** This bug has been marked as a duplicate of bug 105298 ***
Comment 16 Robert Großkopf 2019-07-04 05:45:32 UTC
Why should this one be a duplicate of ReportBuilder (Base)? Problem there has nothing to do with fonts.
Comment 17 V Stuart Foote 2019-07-04 12:44:32 UTC
(In reply to Robert Großkopf from comment #16)
> Why should this one be a duplicate of ReportBuilder (Base)? Problem there
> has nothing to do with fonts.

It isn't, nor is it marked such. Thinking of a different issue?
Comment 18 V Stuart Foote 2019-07-04 12:55:15 UTC
(In reply to V Stuart Foote from comment #17)
> (In reply to Robert Großkopf from comment #16)
> > Why should this one be a duplicate of ReportBuilder (Base)? Problem there
> > has nothing to do with fonts.
> 
> It isn't, nor is it marked such. Thinking of a different issue?

Oops, sorry Robert! Found the typo... not 103387, rather bug 103378 corrected.