Description: When LibreOffice Draw opens a PDF document having text with the Helvetica-Oblique or Helvetica-BoldOblique fonts, the font family chosen is HelveticaOblique rather than Helvetica and the style chosen is Regular rather than Italic or Bold Italic. Consequently, text in the Draw document that should be formatted as Italic or Bold Italic is not. Steps to Reproduce: 1. Open with LibreOffice Draw a PDF document that uses the Helvetica-Oblique font. 2. Select some text characters in the Draw document that should be formatted using the Helvetica-Oblique font. 3. Go to Format > Character... to see the font family and style of the selected text. Actual Results: When characters in the Helvetica-Oblique font are selected, the font family is shown as HelveticaOblique and the style is shown as Regular. When characters in the Helvetica-BoldOblique font are selected, the font family is shown as HelveticaOblique and the style is shown as Bold. Expected Results: When characters in the Helvetica-Oblique font are selected, the font family should be shown as Helvetica and the style shown as Italic. When characters in the Helvetica-BoldOblique font are selected, the font family should be shown as Helvetica and the style shown as Bold Italic. Reproducible: Always User Profile Reset: No Additional Info: The issue was first observed on openSUSE 42.2 Linux. The same issue occurs in LibreOffice 5.3.3.2 (x64) on Windows 10. User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Created attachment 133284 [details] Test PDF document using different styles of Helvetica font When the PDF document is opened in LibreOffice Draw, none of the displayed text is formatted as italic.
Clicking on the text the right Font name is showed on the side bar, but I have not installed those fonts, and those fonts are not embedded on the pdf. Have you those fonts installed?
Created attachment 133285 [details] Shows font properties of test PDF attachment
(In reply to m.a.riosv from comment #2) No, I don't have the fonts installed. The Helvetica, Helvetica-Bold, Helvetica-Oblique, and Helvetica-BoldOblique fonts are in the set of the 14 standard fonts (see https://en.wikipedia.org/wiki/Portable_Document_Format#Standard_Type_1_Fonts_.28Standard_14_Fonts.29). The Evince Document Viewer on openSUSE 42.2 Linux substitutes the Helvetica fonts with Nimbus Sans L fonts as shown in the document-viewer-font-properties.png attachment.
Remember that LibreOffice it's not a pdf reader, the purpose for open the pdf in draw it's allow a basic editing on the pdf. You can set up the font substitution on Menu/Tools/Options/LibreOffice/Fonts But IMO there is not a bug in LibreOffice.
(In reply to m.a.riosv from comment #5) I'm not really trying to use LibreOffice as a PDF viewer. I have quite a few multi-page PDF documents that I want to edit with LibreOffice Draw to remove some personal information. After editing each document, I want to export it back to a PDF. I need the text in the exported PDF to have the same styles (bold, italic, etc.) as the original PDF. I don't want to have to determine which text in the original document was italicized and manually change the text style to be italicized in LibreOffice Draw before exporting as PDF; that's too much manual effort. I have tried to use the font substitution feature in LibreOffice to substitute the HelveticaOblique font with another font, but I have not been successful in getting the font substitution to apply the italic/oblique style. Being that LibreOffice Draw handles Helvetica-Bold correctly by using the Helvetica font family and the bold style, I think that LibreOffice Draw should be able to handle Helvetica-Oblique correctly by using the italic style. That's why I think this is a bug. I'll try to show how Helvetica Bold and Helvetica Oblique are handled inconsistently in LibreOffice Draw by attaching two screen shots.
Created attachment 133309 [details] Shows how LibreOffice Draw formats Helvetica Bold text correctly To create the screen shot, I opened the attached helvetica.pdf document in LibreOffice Draw and selected "vet" in the text "Helvetica Bold". Then I selected Format > Character... from the main menu. The screen shot shows that the selected text ("vet") is correctly formatted with the Helvetica font family and the Bold style.
Created attachment 133310 [details] Shows how LibreOffice Draw formats Helvetica Oblique text incorrectly To create the screen shot, I opened the attached helvetica.pdf document in LibreOffice Draw and selected "vet" in the text "Helvetica Oblique". Then I selected Format > Character... from the main menu. The screen shot shows that the selected text ("vet") is incorrectly formatted with the HelveticaOblique font family and the Regular style. The selected text should be formatted with the Helvetica font family and the Italic style.
Actually Helvectica and HelveticaObligue are going to be replaced anyway. And this looks to be an issue with the font substitution logic losing the Italic and Bold+Italic attribute of the replacement font being assigned. This also affects the ipdf filter. =-ref-= http://opengrok.libreoffice.org/xref/core/sdext/source/pdfimport/wrapper/wrapper.cxx?#466 Note: that support for Type1 PS and Bitmap fonts has been removed at 5.3 Meaning that even if installed none of the these fonts will even show in the GUI to be able to use a font substitution. The Font list for the Style in the Properties deck does continue to show that the font is being substituted.
possibly sdext/source/pdfimport/wrapper/wrapper.cxx where we look for -LightOblique and -BoldOblique but not -Oblique
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=32cb3760a9d7742763fc8610db01689fdb719780 Resolves: tdf#107812 add check for -Oblique It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Confirmed fixed on Windows 10 Pro 64-bit en-US with Version: 5.4.0.0.alpha1+ Build ID: 774f033f86b3728123842321f21b10b400cf6b9a CPU threads: 8; OS: Windows 6.19; UI render: GL; TinderBox: Win-x86@39, Branch:master, Time: 2017-05-16_02:20:51 Locale: en-US (en_US); Calc: CL The Helvetica-Oblique is picked up with substitute font as Italic style. The Helvetica-BoldOblique is picked up with substitute font as Bold + Italic style. On this Windows build font substitution is LiberationSans, Bold, BoldItalic and Italic.
Thank you all for fixing this issue. For what it's worth, I tested the fix on openSUSE Leap 42.2 64-bit and confirmed the fix is working. Version: 5.4.0.0.alpha1+ Build ID: 666901bc82fab69f9a80b564f97b5456d0ef684e CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-05-16_03:33:45 Locale: en-US (en_US.UTF-8); Calc: group