Bug 699324 - Some font rendering is broken
Summary: Some font rendering is broken
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Font API (show other bugs)
Version: 9.22
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-09 09:17 UTC by Anton Petrusevich
Modified: 2018-05-09 13:47 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
sample PDF (134.51 KB, application/pdf)
2018-05-09 09:17 UTC, Anton Petrusevich
Details
Bad rendering example (130.53 KB, image/png)
2018-05-09 09:18 UTC, Anton Petrusevich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Petrusevich 2018-05-09 09:17:38 UTC
Created attachment 15110 [details]
sample PDF

After installing new Kubuntu 18.04 I got a font rendering problem when I print PDF directly from browser (chromium or firefox). I have to save PDF and print it from another program. I identified that the problem is in new Ghostscript version (9.22). There was no such a problem with Kubuntu 16.04 and ghoscript 9.18.

I attach a sample PDF and sceenshot to illustrate the rendering problem.
Comment 1 Anton Petrusevich 2018-05-09 09:18:48 UTC
Created attachment 15111 [details]
Bad rendering example
Comment 2 Ken Sharp 2018-05-09 12:39:01 UTC
(In reply to Anton Petrusevich from comment #0)
> Created attachment 15110 [details]
> sample PDF
> 
> After installing new Kubuntu 18.04 I got a font rendering problem when I
> print PDF directly from browser (chromium or firefox). I have to save PDF
> and print it from another program. I identified that the problem is in new
> Ghostscript version (9.22). There was no such a problem with Kubuntu 16.04
> and ghoscript 9.18.
> 
> I attach a sample PDF and sceenshot to illustrate the rendering problem.

The PDF file does not contain definitions of a number of fonts (Microsoft variations on Arial). As a result a substitute font is used. (It would be useful here to see the transcript of what Ghostscript provides on the back channel)

It 'looks like' Ghostscript can't find a suitable substitute font as a substitute for the missing ones.

You should try running the PDF file through *Ghostscript* itself, not via (inferred from the screenshot) GV. You can then also tell us what Ghostscript command you are using to reproduce the problem.

Testing the file here I see no problems with current code, nor the 9.22 release. I suspect this is a problem with configuration or packaging, rather than with Ghostscript. Possibly the packager has failed to supply the full set of fonts, or has mangled them, or possibly FontConfig is supplying a poor substitute (if you have that installed)

The obvious way to determine this would be to download the current version of the Ghostscript source and build that. If that works then you can take the problem to the KUbuntu maintainers. If it doesn't then you'll be in a position to tell us how you built it and what your configuration is, so that we can reproduce the problem here.
Comment 3 Anton Petrusevich 2018-05-09 12:48:58 UTC
I see no problem on screen in browser, only when I print such a PDF. Ghostscript shows rendering similar to gv. 

Probably my problem is connected to https://bugs.ghostscript.com/show_bug.cgi?id=698784
Comment 4 Ken Sharp 2018-05-09 12:54:47 UTC
(In reply to Anton Petrusevich from comment #3)
> I see no problem on screen in browser, only when I print such a PDF.
> Ghostscript shows rendering similar to gv. 

Then you need to supply the Ghostscript command line you used, which you have not done. You might also reasonably supply the back channel trace from Ghostscript, as I hinted. That will tell us what fonts are missing, and what substitute font is being used in its place.

 
> Probably my problem is connected to
> https://bugs.ghostscript.com/show_bug.cgi?id=698784

Then if you download the latest version it will be fixed, won't it ?
Comment 5 Anton Petrusevich 2018-05-09 13:42:31 UTC
I did following:

`sudo apt-get build-dep ghostscript`

then I downloaded source for 9.23 and made simple

`make`
`sudo make install`

then I copied /usr/local/bin/gs to /usr/bin/gs

and now printing, gs and gv work without problem.

Thanks for your help!