[gs-cvs] gs/lib
Igor Melichev
igor at ghostscript.com
Wed Jul 20 11:14:06 PDT 2005
Update of /cvs/ghostscript/gs/lib
In directory casper2:/tmp/cvs-serv27724/gs/lib
Modified Files:
opdfread.ps
Log Message:
Fix (pdfwrite, ps2write) : Synthesized bitmap fonts had zero character width in charprocs.
DETAILS :
1. The Wx operand of d1 always got the zero value
when a font is being converted into a bitmap font.
2. The Width array was wrongly computed
when a font is being converted into a bitmap font.
3. Computing Metrics, Widths values to be scaled with the FontMatrix,
to account an unusuial FontMatrix of Type 1 fonts,
which were created by 3d parties from TrueTypes.
4. Metrics was not set to a font due to a bad stack balance.
Bug 688172 "ps2write : CID text displacement".
This patch gives a numerous progressions when ps2write runs with a small resolution -r72.
In same time with this patch few files regress when ps2write runs with a small resolution -r72 :
687572.pdf
86554321.pdf
Jahr2000.pdf
EXPECTED DIFFERENCES :
pdfwrite 72dpi :
"020-01.ps"
"093-01.ps"
"Bug687845.ps"
pdfwrite 300dpi :
"020-01.ps"
"093-01.ps"
"405-01.ps"
"450-01.ps"
"Bug687845.ps"
Index: opdfread.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/opdfread.ps,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- opdfread.ps 14 Jul 2005 16:10:43 -0000 1.79
+++ opdfread.ps 20 Jul 2005 18:14:04 -0000 1.80
@@ -1160,7 +1160,7 @@
} ifelse
} for
pop pop pop pop exch pop % fr M
- 1 index exch /Metrics put % fr
+ 1 index exch /Metrics exch put % fr
} {
dup /MissingWidth //knownget exec { % fr mw
256 dict % fr mw M
@@ -1171,7 +1171,7 @@
pop % fr mw M
} forall
exch pop % fr M
- 1 index exch /Metrics put % fr
+ 1 index exch /Metrics exch put % fr
} if
} ifelse
} bind def
@@ -1233,6 +1233,15 @@
} forall
} bind def
+/ScaleMetrics % <Metrics> <scale> ScaleMetrics <Metrics>
+{ 1 index { % M s n v
+ 2 index div % M s n v'
+ 3 index % M s n v' M
+ 3 1 roll put % M s
+ } forall
+ pop
+} bind def
+
/ResolveAndSetFontAux % <resource_name> <size> ResolveAndSetFont -
{ exch dup % s rn rn
//PDFReader /CurrentObject get /Context get /Resources get
@@ -1278,6 +1287,11 @@
dup 2 index /Encoding get % s fr f f e
/Encoding exch put % s fr f
1 index /Metrics //knownget exec { % s fr f M
+ 2 index /Subtype get /TrueType ne {
+ % Adjust Metrics for fonts converted from TrueTypes by 3d party.
+ 1 index /FontMatrix get 0 get 0.001 div
+ //ScaleMetrics exec
+ } if
1 index exch /Metrics exch put % s fr f
} if
1 index /BaseFont get % s fr f n
@@ -1291,7 +1305,6 @@
} if
dup /Subtype get /Type3 eq { % s rn fr
//ObtainEncoding exec
- //ObtainMetrics exec
2 copy exch /FontName exch put
dup /CharProcs get //ResolveDict exec
dup /FontType 3 put
More information about the gs-cvs
mailing list