Bug 706552

Summary: pdfwrite messes up font encoding
Product: Ghostscript Reporter: Werner Lemberg <wl>
Component: PDF InterpreterAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal CC: chris.liddell, ghostpdl-bugs
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: gs.zip
reduced simplified file

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!