Summary: | vertical text rendered by external CIDFontType0 flows horizontal | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | mpsuzuki <mpsuzuki> |
Component: | Text | Assignee: | mpsuzuki <mpsuzuki> |
Status: | NOTIFIED FIXED | ||
Severity: | major | CC: | mpsuzuki |
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Bug Depends on: | |||
Bug Blocks: | 689464 | ||
Attachments: |
sample of simple vertical CJK text, requires free CIDFont: WadaGo-Bold
png16 output by SVN revision 5606 png16 output by SVN revision 5607 png16 output by latest (SVN revision 8482) Reference output by Adobe Acrobat PS file draw vertical text with CIDFontType0 including "nop"-like CDevProc Acrobat Distiller output of sample PS file #3736 Patch to restrict unwanted CDevProc application |
Description
mpsuzuki
2008-01-09 20:05:47 UTC
Created attachment 3683 [details]
sample of simple vertical CJK text, requires free CIDFont: WadaGo-Bold
Created attachment 3684 [details]
png16 output by SVN revision 5606
SVN revision 5606 renders well.
Created attachment 3685 [details]
png16 output by SVN revision 5607
since SVN revision 5607, the vertical text flows horizontal.
Created attachment 3686 [details]
png16 output by latest (SVN revision 8482)
SVN HEAD 8482 has same bug.
Created attachment 3687 [details]
Reference output by Adobe Acrobat
Reference output by Adobe Acrobat.
To render the sample PostScript by Adobe Acrobat with WadaGo-Bold,
you should install WadaGo-Bold font file into the directory:
C:\Program Files\Adobe\Acrobat ?.?\Resource\CIDFont\
I'm assuming that mpsuzuki overlooked the default assignment to 'support' Created attachment 3736 [details]
PS file draw vertical text with CIDFontType0 including "nop"-like CDevProc
Modified sample file that inserts "nop"-like CDevProc to genuine CIDFontType 0
and tries to draw vertical texts.
Created attachment 3737 [details]
Acrobat Distiller output of sample PS file #3736
Acrobat Distiller output of modified sample file #3736,
which inserts "nop"-like CDevProc to genuine CIDFontType0
and tries to draw vertical text. The text flows horizontally.
Created attachment 3738 [details]
Patch to restrict unwanted CDevProc application
Igor's changeset SVN revision 5607 is the application of
CDevProc in any case. If I insert "nop"-like CDevProc to
genuine CIDFont dictionary aslike:
/HeiseiMin-W5 /CIDFont findresource
dup length 1 add dict copy
dup /CIDFontName /HeiseiMin-W5-Fix put
% just pop CID and keep metric infos as they are
dup /CDevProc { pop } put
dup /CIDFontName get exch /CIDFont defineresource
the PDF generated by Adobe Distiller shows text flowing horizontal.
It seems that this bug is "correct" behaviour when unwanted
CDevProc is applied. If I restrict the application of CDevProc
to the case CDevProc is explicitly defined, this bug (vertical
text flowing horizontally) is fixed.
Index: src/zchar1.c
===================================================================
--- src/zchar1.c (revision 8487)
+++ src/zchar1.c (working copy)
@@ -299,7 +299,16 @@
&other_subr);
case type1_result_sbw: /* [h]sbw, just continue */
if (cxs.present != metricsSideBearingAndWidth)
- type1_cis_get_metrics(pcis, cxs.sbw);
+ {
+ ref *pcdevproc;
+ if (zchar_get_CDevProc((const gs_font_base *)pfont,
+ &pcdevproc))
+ type1_cis_get_metrics(pcis, cxs.sbw);
+ else if (!cxs.use_FontBBox_as_Metrics2)
+ type1_cis_get_metrics(pcis, cxs.sbw);
+ else
+ cxs.present = metricsSideBearingAndWidth;
+ }
opstr = 0;
goto icont;
}
We decided to go with a different fix, which has been committed as http://ghostscript.com/pipermail/gs-cvs/2008-January/008087.html |