Merge branch 'f18' into f19

This commit is contained in:
Tim Waugh 2013-06-20 09:57:32 +01:00
commit a84c27abc6
2 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,61 @@
diff -up ghostscript-9.07/Resource/Init/gs_ttf.ps.strange-fonts ghostscript-9.07/Resource/Init/gs_ttf.ps
--- ghostscript-9.07/Resource/Init/gs_ttf.ps.strange-fonts 2013-02-14 07:58:16.000000000 +0000
+++ ghostscript-9.07/Resource/Init/gs_ttf.ps 2013-06-18 16:09:49.904150294 +0100
@@ -41,21 +41,17 @@
% Closes the file in either case.
/.findnonttfontvalue /.findfontvalue load def
/.findfontvalue {
- 1 index read {
- 2 index 1 index unread
- % beginning with binary 0 or 't' (TrueType), or 'O' (OpenType)
- dup 0 eq 1 index (O) 0 get eq or exch (t) 0 get eq or {
+ 1 index .is_ttf_or_otf {
% If this is a font at all, it's a TrueType font.
dup /FontType eq {
pop closefile 42 //true
} {
dup /FontName eq { pop .findttfontname } { pop closefile //false } ifelse
} ifelse
- } {
+ } {
% Not a TrueType font.
.findnonttfontvalue
- } ifelse
- } { pop closefile //false } ifelse
+ } ifelse
} bind def
% <file> .findttfontname <fname> true
@@ -65,7 +61,9 @@
//true 0 .loadttfonttables
tabdict /name .knownget {
dup 8 getu32 f exch setfileposition
- 12 getu32 string f exch readstring pop
+ 12 getu32
+ dup 65535 gt { pop 65535 } if % protect against extremely large name
+ string f exch readstring pop
dup
6 findname not {
4 findname % Try FullName
@@ -82,6 +80,7 @@
% Load a font file that might be a TrueType font.
/tt_tag_dict << <00010000> 0 (true) 0 (typ1) 0 (ttcf) 0 >> readonly def
+/ttf_otf_tag_dict << <00010000> 0 (true) 0 (typ1) 0 (ttcf) 0 (OTTO) 0>> readonly def
% <file> .loadfontfile -
/.loadnonttfontfile /.loadfontfile load def
@@ -95,7 +94,13 @@
} ifelse
} bind def
+% <file> .istruetypefont <bool>
+/.is_ttf_or_otf {
+ dup 0 setfileposition (1234) .peekstring { //ttf_otf_tag_dict exch known } { //false } ifelse
+} bind def
+
currentdict /tt_tag_dict .undef
+currentdict /ttf_otf_tag_dict .undef
% ---------------- Automatic Type 42 generation ---------------- %

View File

@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer
Name: ghostscript
Version: %{gs_ver}
Release: 5%{?dist}
Release: 6%{?dist}
# Included CMap data is Redistributable, no modification permitted,
# see http://bugzilla.redhat.com/487510
@ -27,6 +27,7 @@ Patch8: ghostscript-iccprofiles-initdir.patch
Patch9: ghostscript-gdevcups-debug-uninit.patch
Patch10: ghostscript-gs_sprintf.patch
Patch11: ghostscript-pdfwrite-segfault.patch
Patch12: ghostscript-strange-fonts.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts
Requires: poppler-data
@ -142,6 +143,9 @@ rm -rf expat freetype icclib jasper jpeg lcms2 libpng openjpeg zlib cups/libs
# Upstream patch to fix pdfwrite segfault (bug #962120).
%patch11 -p1 -b .pdfwrite-segfault
# Upstream patch from bug #690692 to handle strange fonts (bug #969660).
%patch12 -p1 -b .strange-fonts
# Remove pdfopt man pages which were mistakenly left in (bug #963882).
rm man/{de/,}pdfopt.1
@ -341,6 +345,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so
%changelog
* Tue Jun 18 2013 Tim Waugh <twaugh@redhat.com> 9.07-6
- Upstream patch from bug #690692 to handle strange fonts (bug #969660).
* Fri May 17 2013 Tim Waugh <twaugh@redhat.com> 9.07-5
- Remove pdfopt man pages which were mistakenly left in (bug #963882).