Bug 410480

Summary: Courier-like true type font not displayed
Product: [Applications] okular Reporter: David <kitt997>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aacid, yurchor
Priority: NOR    
Version First Reported In: 1.6.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: File (PDF produced by LibreOffice 6.2) with testing Courier New text
File is not displayed correctly
pngConversionOk

Description David 2019-08-01 11:22:25 UTC
SUMMARY
Okular fails to display code snippets in some of my documents which make use of a Courier-like font. The text is actually present and selectable, but probably displayed as white on white since not visible. Note that bold version of that font is displayed correctly. This is not always true with any document unfortunately, but for a given document the result is always the same.

STEPS TO REPRODUCE
1. Open a document containing straight regular Courier New frames
2. 
3. 

OBSERVED RESULT
Text is not visible

EXPECTED RESULT
Should obviously be visible. Is displayed correctly with any other reader I tried.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Every font inside the document is reported as embedded, TrueType without any error notice.
Comment 1 Yuri Chornoivan 2019-08-01 11:59:22 UTC
Created attachment 121882 [details]
File (PDF produced by LibreOffice 6.2) with testing Courier New text

Cannot reproduce this using the attached file.

Can you share the problematic file?

Can it be reproduced with

pdftocairo -f <some_page> -l <some_page> -png <your_file>.pdf

?

Thanks in advance for your answers.
Comment 2 David 2019-08-01 12:25:08 UTC
You're right man. I'm sorry I've obviously forgotten to attach the file, there it is. 
Also, the issue is gone when converting to png!
Comment 3 David 2019-08-01 12:25:34 UTC
Created attachment 121884 [details]
File is not displayed correctly
Comment 4 David 2019-08-01 12:26:52 UTC
Created attachment 121885 [details]
pngConversionOk
Comment 5 David 2019-08-01 12:32:25 UTC
I also understand (now that I can see the document, in png XD) that the problem occurs with italic Courier, and not regular as I previously thought.
Comment 6 Yuri Chornoivan 2019-08-01 12:55:23 UTC
Reproducible with the latest poppler (0.79) and Okular from git/master. Qpdfview shows the page as expected (so this might be not a poppler issue, just something Okular-specific).
Comment 7 Albert Astals Cid 2019-08-01 21:16:34 UTC
This is what i get https://i.imgur.com/QtN9WKM.png

This is all right, isn't it?
Comment 8 David 2019-08-01 21:42:50 UTC
(In reply to Albert Astals Cid from comment #7)
> This is what i get https://i.imgur.com/QtN9WKM.png
> 
> This is all right, isn't it?

Yes it is. How's that possible?
Comment 9 Albert Astals Cid 2019-08-01 21:54:43 UTC
i'm going to guess your freetype is old?

Which is your freetype version?
Comment 10 Yuri Chornoivan 2019-08-02 07:41:18 UTC
(In reply to Albert Astals Cid from comment #9)
> i'm going to guess your freetype is old?
> 
> Which is your freetype version?

Mine is 2.9.1.
Comment 11 David 2019-08-03 10:31:17 UTC
(In reply to Albert Astals Cid from comment #9)
> i'm going to guess your freetype is old?
> 
> Which is your freetype version?

2.9.1 as well
Comment 12 Albert Astals Cid 2019-08-04 21:26:48 UTC
I'm going to mark this as worksforme since i'm on freetype 2.10.1 and it works fine.

If you update to a newer freetype version and it's still broken for you, please reopen the bug