Summary: | Add support for WinCharSetFFFF encoded TrueType fonts | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Ken Sharp <ken.sharp> |
Component: | General | Assignee: | Ken Sharp <ken.sharp> |
Status: | CONFIRMED --- | ||
Severity: | enhancement | CC: | christinedelight.top85 |
Priority: | P4 | ||
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: |
WinCharSetFFFF-H
ToUnicode_32_0_R |
Description
Ken Sharp
2009-04-09 00:54:39 UTC
Created attachment 4908 [details] bug690393.ps Sample PostScript file. Created attachment 4909 [details]
WinCharSetFFFF-H
The horizontal CMap for WinCharSetFFFF, the vertical can be made simply by
changing the name and 'WMode' entries.
Actually, as there is a 'GlyphNames2Unicode' defined in the input.ps, the
pdfwrite device currently _does_ know the Unicode and in fact uses the info
to create a 'ToUnicode' map in the font. I looked at the ToUnicode created
by Ghostscript pdfwrite and it does map to the correct Unicode code point,
Thus what is needed is a way to have the font rendering logic map the glyph
that it gets through the 'ToUnicode' map and then get this Unicode glyph from
the TT font. I think that it is possible, given Unicode to get the correct
glyph from a TT font.
For example, the first glyph displayed from the font in TemplateX_nofonts.pdf
<< /BaseFont /MSPGothic-WinCharSetFFFF-H /ToUnicode 32 0 R
/Type /Font /Encoding /Identity-H /DescendantFonts [ 10 0 R ]
/Subtype /Type0
>>
is displayed using:
[ (-~) -0.63088 ... ] TJ
The code (-~) is 0x2d7e which maps through the ToUnicode map to 0x88fd which
is the correct glyph.
I will attach TemplateX_nofonts.pdf (yes, it has a bad xref 29 but ignore that)
and the extraxted object [ 32 0 ], the ToUnicode map.
Currently as far as I know, the PDF interpreter ignores the ToUnicode map.
One thing that is needed is to tell the logic that substitutes the MS-PGothic
font to use the ToUnicode info.
BTW, the cidfmap needs to map MSPGothic even though the normal name is
MS-PGothic created by mkcidfm. The relevant cidfmap I needed to display the
TemplateX_nofonts.pdf was:
/MSPGothic << /FileType /TrueType /SubfontID 1 /CSI [(Japan1) 3] /Path
(c:/windows/fonts/msgothic.ttc) >> ;
/MSGothic << /FileType /TrueType /SubfontID 0 /CSI [(Japan1) 3] /Path
(c:/windows/fonts/msgothic.ttc) >> ;
Created attachment 4910 [details]
ToUnicode_32_0_R
Extracted from TemplateX_nofonts.pdf
Created attachment 4911 [details]
TemplateX_nofonts.pdf
|