- Apply fonts in CIDFnmap even if the same fontnames are already registered

(bug #163231).
- Resolves: rhbz#163231
This commit is contained in:
Tim Waugh 2007-04-17 10:12:30 +00:00
parent b5ff478a7d
commit 20e71695f9
2 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,66 @@
--- espgs-8.15.4/lib/cjkv/tt11util.ps.exactly-enable-cidfnmap 2006-06-06 10:59:04.000000000 +0100
+++ espgs-8.15.4/lib/cjkv/tt11util.ps 2007-04-17 11:09:56.000000000 +0100
@@ -179,6 +179,7 @@
%dup /gsubhog exch _cjkv_type11_tmp /gsubost get _cjkv_type11_tmp /gsubocv get add 4 add _cjkv_type11_tmp /gsubglc get getinterval _cjkv_type11_tmp 3 1 roll put
dup /gsubvog exch _cjkv_type11_tmp /gsubost get 6 add _cjkv_type11_tmp /gsubglc get 2 mul getinterval _cjkv_type11_tmp 3 1 roll put
dup /cvfmt exch _cjkv_type11_tmp /gsubost get _cjkv_type11_tmp /gsubocv get add 0 add .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
+ _cjkv_type11_tmp /cvfmt get 1 eq {
dup /cvglc exch _cjkv_type11_tmp /gsubost get _cjkv_type11_tmp /gsubocv get add 2 add .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
dup /gsubhog exch _cjkv_type11_tmp /gsubost get _cjkv_type11_tmp /gsubocv get add 4 add _cjkv_type11_tmp /cvglc get 2 mul getinterval _cjkv_type11_tmp 3 1 roll put
CJKV_DEBUG_GSUB {
@@ -194,25 +195,26 @@
_cjkv_type11_tmp /gsubvog get exch .cjkv_getu16 =
} for
} if
- _cjkv_type11_tmp /cvfmt get 1 eq {
/gsubh2v << 0 2 _cjkv_type11_tmp /gsubhog get length 2 sub {
dup _cjkv_type11_tmp /gsubhog get exch .cjkv_getu16
exch _cjkv_type11_tmp /gsubvog get exch .cjkv_getu16
} for >> _cjkv_type11_tmp 3 1 roll put
} {
_cjkv_type11_tmp /cvfmt get 2 eq {
- /gsubh2v << 0 6 _cjkv_type11_tmp /gsubhog get length 6 sub {
- dup 0 add /fgid exch _cjkv_type11_tmp /gsubhog get exch .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
- dup 2 add /lgid exch _cjkv_type11_tmp /gsubhog get exch .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
- 4 add /cvidx exch _cjkv_type11_tmp /gsubhog get exch .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
+ dup /cvrngc exch _cjkv_type11_tmp /gsubost get _cjkv_type11_tmp /gsubocv get add 2 add .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
+ dup /cvrngs exch _cjkv_type11_tmp /gsubost get _cjkv_type11_tmp /gsubocv get add 4 add _cjkv_type11_tmp /cvrngc get 6 mul getinterval _cjkv_type11_tmp 3 1 roll put
+ /gsubh2v << 0 6 _cjkv_type11_tmp /cvrngs get length 6 sub {
+ dup 0 add /fgid exch _cjkv_type11_tmp /cvrngs get exch .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
+ dup 2 add /lgid exch _cjkv_type11_tmp /cvrngs get exch .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
+ 4 add /cvidx exch _cjkv_type11_tmp /cvrngs get exch .cjkv_getu16 _cjkv_type11_tmp 3 1 roll put
CJKV_DEBUG_GSUB {
(fgid: ) print _cjkv_type11_tmp /fgid get =
(lgid: ) print _cjkv_type11_tmp /lgid get =
(cvidx: ) print _cjkv_type11_tmp /cvidx get =
} if
_cjkv_type11_tmp /fgid get 1 _cjkv_type11_tmp /lgid get {
- dup _cjkv_type11_tmp /cvidx get add _cjkv_type11_tmp /fgid get sub
- exch _cjkv_type11_tmp /gsubvog get exch .cjkv_getu16
+ dup _cjkv_type11_tmp /cvidx get add _cjkv_type11_tmp /fgid get sub 2 mul
+ _cjkv_type11_tmp /gsubvog get exch .cjkv_getu16
} for
} for >> _cjkv_type11_tmp 3 1 roll put
} {
--- espgs-8.15.4/lib/cjkv/cjkfnmap.ps.exactly-enable-cidfnmap 2007-04-17 11:04:52.000000000 +0100
+++ espgs-8.15.4/lib/cjkv/cjkfnmap.ps 2007-04-17 11:09:56.000000000 +0100
@@ -56,6 +56,11 @@
% Define the name of the CID font map file.
userdict /_cjkv_CIDFontmap 10 dict put
+ /.cjkv_erase_cidfmap_entry {
+ CJKV_DEBUG_FNMAP { (erase cidfmap entry for: ) print dup == } if
+ /CIDFont /Category findresource /.map get exch undef
+ } bind def
+
% <dict> <file> .readCIDFontmap <dict>
% Code from gs_fonts.ps::.readFontmap
/.cjkv_readCIDFontmap {
@@ -67,6 +72,7 @@
( has no associated file or alias name! Giving up.) = flush
{.cjkv_readCIDFontmap} 0 get 1 .quit
} if
+ 1 index .cjkv_erase_cidfmap_entry
dup type dup /stringtype eq exch /nametype eq or not
{ (CIDFontmap entry for ) print 1 index =only
( has an invalid file or alias name! Giving up.) = flush

View File

@ -23,6 +23,7 @@ Patch5: ghostscript-split-cidfnmap.patch
Patch6: ghostscript-gxcht-64bit-crash.patch Patch6: ghostscript-gxcht-64bit-crash.patch
Patch7: ghostscript-dvipdf.patch Patch7: ghostscript-dvipdf.patch
Patch8: ghostscript-Fontmap.local.patch Patch8: ghostscript-Fontmap.local.patch
Patch9: ghostscript-exactly-enable-cidfnmap.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: urw-fonts >= 1.1, ghostscript-fonts
BuildRequires: libjpeg-devel, libXt-devel BuildRequires: libjpeg-devel, libXt-devel
@ -100,6 +101,10 @@ A GTK-enabled version of Ghostscript, called 'gsx'.
# Allow local overrides for Fontmap (bug #233966). # Allow local overrides for Fontmap (bug #233966).
%patch8 -p1 -b .Fontmap.local %patch8 -p1 -b .Fontmap.local
# Apply fonts in CIDFnmap even if the same fontnames are already registered
# (bug #163231).
%patch9 -p1 -b .exactly-enable-cidfnmap
# Convert manual pages to UTF-8 # Convert manual pages to UTF-8
from8859_1() { from8859_1() {
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@ -269,6 +274,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Tue Apr 17 2007 Tim Waugh <twaugh@redhat.com> 8.15.4-3 * Tue Apr 17 2007 Tim Waugh <twaugh@redhat.com> 8.15.4-3
- Apply fonts in CIDFnmap even if the same fontnames are already registered
(bug #163231).
- New file CIDFmap (bug #233966). - New file CIDFmap (bug #233966).
- Allow local overrides for FAPIcidfmap, cidfmap and Fontmap (bug #233966). - Allow local overrides for FAPIcidfmap, cidfmap and Fontmap (bug #233966).