Page 1 of 1

[Solved] Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:21 pm
by RogueBells
Hello everyone,

To start with, I'm running OO 4.1.4 on Windows 7 Pro. I'm no computer genius, so if this is a macro fix I'm stuffed, but maybe someone has a "You've got the settings wrong" solution or at least a "You can't actually do that" message for me!

I have a Calc sheet of Segoe UI Symbols inserted from the Insert Special Character tool in the Insert menu. They display fine in the sheet and in the print preview. The formula bar keeps showing some of them as half of the character in that cell combined with half of a character from cell above or below it, depending on if I "arrow up-ed" or "arrow down-ed" to get to it. Beginning of the problem maybe?

My big problem is when I export the sheet to PDF. The first four symbols are fine and the rest each display as two blank squares. The PDF properties show the font as Segoe UI Symbol, and Control Panel shows Segoe UI Symbol as an installed font. These seem to be the problem in other similar issues I've found on the forum, so now I'm stuck.

I've attached examples for everyone to poke, so please have at it as I've hit a wall with the little I know how to play with :crazy:

Last note - the four that display correctly have four character Unicode names (U+260E, 260F, 2706 and 2709 in order on the Calc sheet). The ones that don't work have five digit numbers (U+1F3E0, 1F464, 1F4BB, 1F4DE and 1F4F1 again in order). Not sure if this helps?

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:32 pm
by RogueBells
Also, an attachment of the export settings for the PDF. The tab displayed is the only one used - I have not attempted to play with any of the settings on this page or the other tabs. I just hit Export to PDF and OK

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:37 pm
by Zizi64
I just exported your sample file with my LibreOffice 5.4.7:
Segoe Example_Exported from LO547.pdf
(8.59 KiB) Downloaded 220 times

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:44 pm
by RogueBells
OK, now I'm really confused. Your version works fine, so maybe it's something to do with my computer?
I've attached what I get when I open my version.

Could this be a case of me needing LibreOffice rather than OpenOffice?

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:46 pm
by RoryOF
Try checking PDF/A-1a on the General tab of the Export as PDF dialog.

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:50 pm
by Zizi64
Could this be a case of me needing LibreOffice rather than OpenOffice?
The LibreOffice is the most actively developed free and open-source office suite. It has some bug fixes and some new features that AOO has not. And (therefore) maybe it has som extra bugs too.

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 5:54 pm
by Zizi64
Try checking PDF/A-1a on the General tab of the Export as PDF dialog.
I just tried it in my AOO 4.1.5 portable version. Here is the result:
Segoe Example_AOO415.pdf
(13.43 KiB) Downloaded 187 times

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 6:03 pm
by RogueBells
I tried the PDF 1A setting and got the same thing. So it looks like an AOO thing and not a LO thing. I've got a new laptop on the way so maybe I'll have to get LibreOffice on that one and see if that works.

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 6:08 pm
by Zizi64
You can install the LibreOffice near the AOO, or you can try one of the portable version of the LO:
The Still versions of the portable LibreOffice:
https://portableapps.com/apps/office/li ... able-still
http://www.winpenpack.com/en/download.php?view.1354

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 6:21 pm
by RogueBells
OK, thankyou. I will look into those and see what works for me. Thanks for all your help - I'll put this as solved for now since it doesn't look like I can do much else with it.

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sat Jun 30, 2018 6:38 pm
by John_Ha
Are you sure you have the Segoe UI Symbol font installed? "Square boxes in a PDF" occur when a font is missing. Open a PDF > File > Properties > Fonts ..., lists the fonts in the PDF file. Irrespective of whether you tick the Embed fonts box AOO embeds the fonts in a PDF.

Remember that the font showing in the Writer font drop-down selection box is the font the document is asking for. This may NOT be the font being used to create the display because, if the font being asked for is not installed on the PC, Windows (or other operating system) will silently substitute a different font which is available.

The TestFonts add-on is invaluable for finding missing fonts which the document is asking for, but which are not installed on the PC.

You can see which fonts are installed on the PC by Start > Control Panel > Fonts or by clicking C:\Windows\Fonts.
 Edit: Added information .... 
I extracted content.xml from your .ods file and only the first 4 symbols are correctly shown and the rest are shown as rectangles. I don't know why the symbols are shown in the spreadsheet itself (and in a text document when I copied them to it) but not in Notepad ++.

Your PDF has embedded "SegoeUISymbol" with no spaces. Your .odt shows no missing fonts when I test it on my PC where I have "Segoe UI Symbol Regular" installed.

Re: Segoe UI Symbol font won't export to PDF correctly

Posted: Sat Jun 30, 2018 7:02 pm
by John_Ha
Zizi64 wrote:I just exported your sample file with my LibreOffice 5.4.7:
Zizi64

That displays correctly for me.
Zizi64 wrote:I just tried it in my AOO 4.1.5 portable version. Here is the result:
Zizi64

That displays with boxes.

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sat Jun 30, 2018 7:29 pm
by Zizi64
I have Segoe fonts installed:
Installed fonts.png

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sat Jun 30, 2018 7:49 pm
by John_Ha
The characters which display as squares are coded differently in content.xml and when I copy them into Notepad. They seems to use either three or four bytes to encode each character.

This is Notepad where I copied each of the ten characters and separated them by a space.
5.gif
5.gif (7.46 KiB) Viewed 6866 times
This is the file opened in a Hex editor where space is coded as " 20 " and I underlined each of the 10 characters (though I am not sure if I got the first correct). The first character is correct as all NotePad files start with " EF BB BF " which is not part of the file content.
6.gif

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sun Jul 01, 2018 2:41 pm
by RogueBells
I double checked my Control Panel>Fonts and "Segoe UI Symbol Regular" is listed as installed. Would the four bytes to encode the characters that don't display properly have anything to do with the Unicode numbers having five digits (since the characters that work are encoded with three bytes and have four digit Unicode numbers)?

Still haven't managed to fix the issue - I'm going to try it with Libre when I get a chance to install it.

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sun Jul 01, 2018 4:10 pm
by John_Ha
It seems to be something strange with Segoe UI Symbol font. Summarising:

1 I have Segoe UI Symbol installed. It is Microsoft TrueType 5.01 seguisym.ttf 842,104 bytes.

2 Your .ods (or a .odt with the symbols copied to it) displays correctly

3 Notepad, Notepad++, Firefox and WordPad do not display correctly.

4 Thunderbird displays correctly.

5 A PDF created by AOO does not display correctly

6 A PDF created by LO on my PC displays correctly

I am confused.
 Edit: I think the problem arises with characters which use 4 bytes to define them as they are the only characters which do not display. Characters using only 3 bytes do display.

A possible (guessed) explanation is therefore that some applications accept all 4 bytes, and display correctly; while other applications truncate at 3 bytes, and do not display correctly. Both AOO and LO display correctly but, while LO passes all 4 bytes to a PDF, AOO passes only the first 3 bytes.

In my image in an earlier post, the first character uses only 3 bytes as the " EF BB BF " are present in any NotePad file. 
I suggest googling for more ideas.

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sun Jul 01, 2018 4:59 pm
by merlijn
With AOO 4.2.0 and PDFCreator a correct PDF was created. (Also my Notepad++ displayed correctly).

On my system, (win10 Pro 1709 x64):
seguisym.ttf version 6.23
2,34 MB (2.454.648 bytes)

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sun Jul 01, 2018 5:44 pm
by Zizi64
With AOO 4.2.0 and PDFCreator a correct PDF was created.
The PDF Creator works fine with my AOO 4.1.5 portable too.

(The PDF Creator is not a part of the office suite, but it is a free third party virtual PDF printer application.)

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sun Jul 01, 2018 5:47 pm
by John_Ha
merlijn wrote:With AOO 4.2.0 and PDFCreator a correct PDF was created. (Also my Notepad++ displayed correctly).
AOO 4.2.0 is a development pre-release so we don't know if the fix is due to 4.2.0 or to the use of PDFCreator.

Please do the following test:

1. Open Segoe Example.ods (posted above) with AOO 4.2.0
2. File > Export as PDF. Tick Embed fonts.

What happens? Are all 10 characters displayed in the PDF when viewed with Adobe Reader?
 Edit: PrimoPDF creates a PDF from AOO 4.1.5 and Segoe Example.ods where all characters are visible.

It strongly suggest that AOO only passes the three bytes and not the four bytes when creating a PDF. 

Re: [SOLVED] Segoe UI Symbol font won't export to PDF correc

Posted: Sun Jul 01, 2018 5:54 pm
by RogueBells
I decided to be adventurous and downloaded the PDFCreator - it displays the symbols correctly so (for me at least) problem solved. Yay! Thanks to merlijn for the save :-) And thank you to everyone who fiddled and poked around to try and work it out; a lot of the details were beyond my understanding but I really appreciate the effort and time you put in!