Bug 409176 - Some characters not rendered in PDF using Okular
Summary: Some characters not rendered in PDF using Okular
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.7.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-25 14:18 UTC by drokergeek
Modified: 2019-06-26 21:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Result in Okular (123.67 KB, image/png)
2019-06-25 14:18 UTC, drokergeek
Details
Result using Foxit in Windows (121.36 KB, image/png)
2019-06-25 14:18 UTC, drokergeek
Details
Affected PDF (1.21 MB, application/pdf)
2019-06-25 14:19 UTC, drokergeek
Details
Using firefox PDF viewer works too (189.17 KB, image/png)
2019-06-25 14:26 UTC, drokergeek
Details
Properties -> Fonts (74.88 KB, image/png)
2019-06-25 14:26 UTC, drokergeek
Details
Fonts (86.22 KB, image/png)
2019-06-25 14:52 UTC, drokergeek
Details
Fonts, again... (89.07 KB, image/png)
2019-06-25 14:53 UTC, drokergeek
Details
After removing the gsfonts (141.97 KB, image/png)
2019-06-25 15:00 UTC, drokergeek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description drokergeek 2019-06-25 14:18:13 UTC
Created attachment 121130 [details]
Result in Okular

I have some PDFs in which I cannot see correctly the document in okular, in Plasma 5.16.1, framework 5.59, archlinux.
If I open them with foxit in linux i can see the missing characters. I attach jpgs and the affected pdf.
Comment 1 drokergeek 2019-06-25 14:18:31 UTC
Created attachment 121131 [details]
Result using Foxit in Windows
Comment 2 drokergeek 2019-06-25 14:19:00 UTC
Created attachment 121132 [details]
Affected PDF
Comment 3 drokergeek 2019-06-25 14:20:35 UTC
You can see the greek letter theta missing in the drawing and also in the middle equations, and also pi is missing
Comment 4 Luigi Toscano 2019-06-25 14:23:14 UTC
Can you please report the content of the Fonts tab under File menu -> Properties ?

From the past experience, 99% this is a font replacement issue which happens outside Okular.
Comment 5 drokergeek 2019-06-25 14:26:01 UTC
Created attachment 121133 [details]
Using firefox PDF viewer works  too
Comment 6 drokergeek 2019-06-25 14:26:18 UTC
Created attachment 121134 [details]
Properties -> Fonts
Comment 7 drokergeek 2019-06-25 14:28:55 UTC
(In reply to Luigi Toscano from comment #4)
> Can you please report the content of the Fonts tab under File menu ->
> Properties ?
> 
> From the past experience, 99% this is a font replacement issue which happens
> outside Okular.

I don't really mind there are problems like this, the only thing I don't like is not having any kind of warning about this kind of problems because i take for granted (I don't know if I should but I always do) that PDF will render perfectly, like a jpg, and I usually print PDFs without inspecting them to see if everything is in order... I don't know, could a warning be designed or something like that?
Comment 8 Luigi Toscano 2019-06-25 14:47:09 UTC
Try to remove those fonts in the gsfonts folder (you can expand the window to see the full path) and see if improves.

I suspect it's not easy to find out whether the right font is used for replacement. Or better, how to find out whether the chosen character is the right one. If I remember the previous discussions about this, the PDFs where the fonts are not embedded are known for being not good.
Comment 9 Luigi Toscano 2019-06-25 14:49:31 UTC
Info provided (but it would be useful to have the screenshot with the full path and the name of the fonts)
Comment 10 drokergeek 2019-06-25 14:52:13 UTC
(In reply to Luigi Toscano from comment #9)
> Info provided (but it would be useful to have the screenshot with the full
> path and the name of the fonts)

Oh sorry about this
Comment 11 drokergeek 2019-06-25 14:52:27 UTC
Created attachment 121136 [details]
Fonts
Comment 12 drokergeek 2019-06-25 14:53:14 UTC
Created attachment 121137 [details]
Fonts, again...
Comment 13 drokergeek 2019-06-25 15:00:11 UTC
(In reply to Luigi Toscano from comment #8)
> Try to remove those fonts in the gsfonts folder (you can expand the window
> to see the full path) and see if improves.
> 
> I suspect it's not easy to find out whether the right font is used for
> replacement. Or better, how to find out whether the chosen character is the
> right one. If I remember the previous discussions about this, the PDFs where
> the fonts are not embedded are known for being not good.

Now is worse hahaha
Comment 14 drokergeek 2019-06-25 15:00:44 UTC
Created attachment 121138 [details]
After removing the gsfonts
Comment 15 Yuri Chornoivan 2019-06-25 16:33:56 UTC
Looks like a fontconfig issue. For me, blacklisting all the fonts before "Symbol" "Regular" in the output of

fc-match -s Symbol

like this (should be put in the <fontconfig> section of ~/.config/fontconfig/fonts.conf):

<selectfont>
    <rejectfont>
        <glob>/usr/share/fonts/drakfont/tmp/tmp/*</glob>
    </rejectfont>
    <rejectfont>
        <pattern>
            <patelt name="family" >
                <string>Standard Symbols PS</string>
            </patelt>
        </pattern>
    </rejectfont>
</selectfont>

solves the rendering problem (symbol.ttf should be installed for sure).

Anyway, it is a good practice to embed or subset all the non-standard fonts in PDF (cf. the other embedded part of Symbol in this slide).
Comment 16 Albert Astals Cid 2019-06-26 21:07:41 UTC
Not really our bug, the font is not provided by the pdf so we have to guess, you need to configure your system so that the guessing works.

Anyhow even if this was a bug because you said "it should guess better", the guessing is done by poppler, so also not our bug.