This is a split bug from bug 78427: To correctly parse attachment 98668 [details] during sdext.pdfimport, we need to be able to detect Type 1C font. My understanding is that currently LibreOffice can only detect TrueType font and Type 1 font, but can not detect Type 1C (i.e. Type 1 Compacted) font. See: vcl/source/font/font.cxx, where in line 616 it is identifyTrueTypeFont, and in line 720 it is identifyType1Font. These two member functions are used in identifyFont in line 806. The proposal is to add an identifyType1CompactedFont there to detect the attributes such as font name, weight, italic for Type 1C font. Steps to Reproduce: 1. Open attachment 98668 [details] with Draw. Expected: "Bold text" should be bold, while "Bold italic text" should be bold+italic. Specifications of Compact Font Format can be found in: https://wwwimages2.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf As a comparison the specifications of Type 1 Font Format can be found in: https://adobe-type-tools.github.io/font-tech-notes/pdfs/T1_SPEC.pdf
Created attachment 175726 [details] CairoFont-1-0-italic.data The CairoFont-1-0 (italic) font extracted from the pdf file in attachment 98668 [details].
Created attachment 175727 [details] CairoFont-3-0-bold-italic.data The CairoFont-3-0 (bold italic) font extracted from the pdf file in attachment 98668 [details].
Kevin, LO has dropped Type1 font support in 2016 year https://lists.freedesktop.org/archives/libreoffice/2016-October/075652.html Below is some excerpt: * Bitmap fonts on Windows (Michael) + no good physical font API on Windows + DirectWrite provides one. + doesn't work with Bitmap Fonts. + Office 2013 dropped bitmap / Type1 fonts and more long ago. + Biting us with Harfbuzz in some cases. + https://bugs.documentfoundation.org/show_bug.cgi?id=103514 + an issue for the WinXP support (Cloph) + Harfbuzz doesn't support that. (and will not support Type1 fonts) + 5.3 will be the last with current rendering + see no point in also support bitmap fonts in 5.4 + thought Khaled pushed a patch to make it work on WinXP (Caolan) + but happy to loose bitmap fonts. + we get a fallback font anyway (Michael) => abandoning bitmap / Type 1 fonts etc. if not DirectWrite supported in future. So I'm not sure about your suggestion...
Type 1C is CFF fonts, there are not plain text so code handling Type 1 fonts will not be of any use. Not going to happen, I’m afraid.