[cairo-bugs] [Bug 70364] New: Umlaut conversion error for Type1 fonts in WinAscii Encoding
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Oct 10 23:59:07 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=70364
Priority: medium
Bug ID: 70364
Assignee: ajohnson at redneon.com
Summary: Umlaut conversion error for Type1 fonts in WinAscii
Encoding
QA Contact: cairo-bugs at cairographics.org
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: winter at bfw-online.de
Hardware: x86 (IA32)
Status: NEW
Version: unspecified
Component: postscript backend
Product: cairo
Created attachment 87422
--> https://bugs.freedesktop.org/attachment.cgi?id=87422&action=edit
Input document which is printed incorrectly
Hi,
when printing (or running the print preview of) the attached PDF with evince
(utilizing the PostScript backend of Cairo of course), the umlauts (like ö) are
lost. The fonts used in the PDF are not embedded, the PDF seems to be encoded
in a Windows charset and the resulting PostScript seems to include the combined
characters for umlauts like 'odieresis', however it cannot render them hinting
the possibility it is a combined glyph made up of 'o' and 'dieresis' and one of
those might be missing. However my tries to manually include 'dieresis' in the
resulting type1 font subset dict were futile.
Also probably noteworthy but not relevant to this bug is the fact that xpdf
crashes when one tries to open the PDF, which suggests it might by a "strange"
PDF.
My approach of including 'dieresis' in the dictionary was (patched against
cairo-1.12.16 of Debian, the git log of the file seemed to suggest there were
no later patches to the file after the Debian release):
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 4b64403..dfcd1a1 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -1407,6 +1407,15 @@ skip_subrs:
cairo_type1_font_subset_use_glyph (font, index);
}
+ for (i = 0; i < font->base.num_glyphs; i++) if (font->glyph_names[i])
+ { fprintf (stderr, "glyph: %s\n", font->glyph_names[i]);
+ if (!strcmp (font->glyph_names[i], "dieresis")
+ || !strcmp (font->glyph_names[i], "odieresis") || !strcmp
(font->glyph_names[i], "o"))
+ { cairo_type1_font_subset_use_glyph (font, i);
+ fprintf (stderr, "-----> added\n");
+ }
+ }
+
/* Go through the charstring of each glyph in use, get the glyph
* width and figure out which extra glyphs may be required by the
* seac operator (which may cause font->num_glyphs to increase
Best regards,
Leon
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20131011/f18a4583/attachment.html>
More information about the cairo-bugs
mailing list