Bug 706552 - pdfwrite messes up font encoding
Summary: pdfwrite messes up font encoding
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-06 13:28 UTC by Werner Lemberg
Modified: 2023-04-12 16:22 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
gs.zip (71.64 KB, application/zip)
2023-04-06 13:28 UTC, Werner Lemberg
Details
reduced simplified file (3.43 KB, application/pdf)
2023-04-06 13:55 UTC, Ken Sharp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Werner Lemberg 2023-04-06 13:28:12 UTC
Created attachment 23980 [details]
gs.zip

[faf9c9b57b9d8a8e3f24fc83eb65ab740c2c0702]

Unpack the attached archive in a new directory and say

```
sh call-gs.sh
```

While the Latin text in the input `lilypond.pdf` is correct, some accented characters of the same text in the output file `lilypond-gs.pdf` are not.

Smells like a bug...
Comment 1 Ken Sharp 2023-04-06 13:31:24 UTC
(In reply to Werner Lemberg from comment #0)

> Unpack the attached archive in a new directory and say
> 
> ```
> sh call-gs.sh
> ```

Don't worry for this one, but could you please just give the Ghostscript command line please, instead of a shell script. Not everyone runs Linux.
Comment 2 Werner Lemberg 2023-04-06 13:38:58 UTC
Here is the command in the `.sh` file as single, long line for Windows:

```
gs -dBATCH -dNOSAFER -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=lilypond-gs.pdf -I .\font lilypond.pdf
```

Note that it works just fine using gs version 9.56.1, together with `-dNEWPDF=false`.
Comment 3 Ken Sharp 2023-04-06 13:55:36 UTC
Created attachment 23981 [details]
reduced simplified file

OK so this isn't (as far as I can tell) anything to do with pdfwrite. The attached simplified file has a single glyph, oacute (octal 363 in WinAnsiEncoding) and that renders blank, presumably because we're getting a /.notdef.

A
Comment 4 Chris Liddell (chrisl) 2023-04-12 14:00:53 UTC
Fixed in:

https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f05fa039448c
Comment 5 Werner Lemberg 2023-04-12 16:22:31 UTC
Confirmed, thanks!