[Pkg-gs-devel] r44 - gs-common/trunk/debian
gs-common/trunk/debian/patches gs-common/trunk/man/de
gs-common/trunk/scripts gs-gpl/tags/8.54.dfsg.1-5
gs-gpl/tags/8.54.dfsg.1-5/debian
gs-gpl/tags/8.54.dfsg.1-5/debian/patches
Masayuki Hatta
mhatta at costa.debian.org
Sun Oct 22 23:23:50 UTC 2006
Author: mhatta
Date: Sun Oct 22 23:23:49 2006
New Revision: 44
Added:
gs-common/trunk/scripts/ps2ps2 (contents, props changed)
gs-gpl/tags/8.54.dfsg.1-5/
gs-gpl/tags/8.54.dfsg.1-5/debian/
- copied from r42, /gs-gpl/trunk/debian/
gs-gpl/tags/8.54.dfsg.1-5/debian/patches/04_gdevxini_segv_fix.dpatch
- copied unchanged from r43, /gs-gpl/trunk/debian/patches/04_gdevxini_segv_fix.dpatch
gs-gpl/tags/8.54.dfsg.1-5/debian/patches/10_epsn_margin_workaround.dpatch
- copied unchanged from r43, /gs-gpl/trunk/debian/patches/10_epsn_margin_workaround.dpatch
Removed:
gs-common/trunk/debian/patches/01_fix_insecure_tmpfile.dpatch
gs-common/trunk/debian/patches/02_better_dvipdf.dpatch
Modified:
gs-common/trunk/debian/README.Debian
gs-common/trunk/debian/changelog
gs-common/trunk/debian/copyright
gs-common/trunk/debian/gs.defoma
gs-common/trunk/debian/links
gs-common/trunk/man/de/dvipdf.1
gs-common/trunk/man/de/font2c.1
gs-common/trunk/man/de/gsnd.1
gs-common/trunk/man/de/pdf2dsc.1
gs-common/trunk/man/de/pdf2ps.1
gs-common/trunk/man/de/pdfopt.1
gs-common/trunk/man/de/printafm.1
gs-common/trunk/man/de/ps2ascii.1
gs-common/trunk/man/de/ps2pdf.1
gs-common/trunk/man/de/ps2ps.1
gs-common/trunk/man/de/wftopfa.1
gs-common/trunk/scripts/bdftops
Log:
As per 0.3.11.
Modified: gs-common/trunk/debian/README.Debian
==============================================================================
--- gs-common/trunk/debian/README.Debian (original)
+++ gs-common/trunk/debian/README.Debian Sun Oct 22 23:23:49 2006
@@ -17,13 +17,13 @@
Following describes what the Defoma-configuration script for gs does.
-Ghostscript accepts type1, type3, gsfontderivatice, truetype, cid,
-cmap and psprint categories. gs registered all PostScript fonts
-available to gs in postscript category with <gs>/ added to the top of
-their names.
+Ghostscript accepts "type1", "type3", "gsfontderivative", "truetype",
+"cid", "cmap" and "psprint" categories. gs registers all PostScript
+fonts available to gs in the postscript category with <gs>/ added to
+the front of their names.
Ghostscript creates files under /var/lib/defoma/gs.d/dirs. This
-directory contains CMap and fonts subdirectories, and CMap
+directory contains CMap and fonts subdirectories, and the CMap
subdirectory is symlinked under /usr/share/ghostscript.
If you want to have a certain PostScript font name which is not
@@ -35,10 +35,11 @@
to edit the subst-rule.
For example, if you want to have Charter-Bold available whose charset
-is ISO8859-1 and which has serifed, propotional widthed bold face, you
-should add the following line:
+is ISO8859-1 and which has serifed, proportionally-spaced bold face,
+you should add the following line:
-Charter-Bold --Charset,* ISO8859-1 --GeneralFamily Roman --Weight Bold --Width Variable --Shape Upright Serif
+Charter-Bold --Charset,* ISO8859-1 --GeneralFamily Roman --Weight Bold
+--Width Variable --Shape Upright Serif
Then Charter-Bold will be substituted by the most similar font and
become available.
@@ -49,7 +50,7 @@
Dotum-Medium and KSC-EUC-H is a name of CMap, you should add the
following line:
-Dotum-Medium --CIDRegistry,* Adobe --CIDOrdering,* Korea1 --Weight Medium --Suape Upright
+Dotum-Medium --CIDRegistry,* Adobe --CIDOrdering,* Korea1 --Weight Medium --Shape Upright
Then Dotum-Medium-* (* is a name of Korean CMap) are substituted and
become available.
@@ -57,7 +58,7 @@
Following is a list of hinttypes specific to gs.
* GS-OriginFont, GS-OriginID: These hinttypes are used in
- gsfontderivative category. Substance of a font within this
+ gsfontderivative category. The content of a font within this
category is a small PostScript program that generates a
derivative font from a certain substantial type1 or type3 font.
Generally a derivative font has bold or oblique shape, while
@@ -105,4 +106,4 @@
accepts this category and add the fonts and their hints to a
subst-rule.
- -- Masayuki Hatta (mhatta) <mhatta at debian.org>, Sun Mar 13 16:05:06 2005
+ -- Masayuki Hatta (mhatta) <mhatta at debian.org>, Sat, 21 Oct 2006 05:21:11 +0900
Modified: gs-common/trunk/debian/changelog
==============================================================================
--- gs-common/trunk/debian/changelog (original)
+++ gs-common/trunk/debian/changelog Sun Oct 22 23:23:49 2006
@@ -1,3 +1,13 @@
+gs-common (0.3.11) unstable; urgency=high
+
+ * Updated scripts and manpages as per gs-gpl 8.54.
+ * Added the pdf2txt symlink - closes: #352327
+ * Revived cidfmap support in gs.defoma, and now handles warnings better - closes: #385039, #384465, #377238, #378834
+ * Fixed numerous typos in README.Debian, thank you so much Andrew T. Young - closes: #332875
+ * Fixed FSF's address.
+
+ -- Masayuki Hatta (mhatta) <mhatta at debian.org> Thu, 19 Oct 2006 16:50:40 +0900
+
gs-common (0.3.10) unstable; urgency=low
[ Kenshi Muto ]
Modified: gs-common/trunk/debian/copyright
==============================================================================
--- gs-common/trunk/debian/copyright (original)
+++ gs-common/trunk/debian/copyright Sun Oct 22 23:23:49 2006
@@ -20,8 +20,8 @@
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301, USA.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
Modified: gs-common/trunk/debian/gs.defoma
==============================================================================
--- gs-common/trunk/debian/gs.defoma (original)
+++ gs-common/trunk/debian/gs.defoma Sun Oct 22 23:23:49 2006
@@ -1,3 +1,7 @@
+#
+# gs.defoma: Defoma support for Ghostscripts
+#
+
@ACCEPT_CATEGORIES = qw(type1 type3 gsfontderivative truetype cid
cmap psprint);
@@ -26,881 +30,901 @@
my $CMapDir = "$PkgDir/dirs/CMap";
my $TTCidDir = "$PkgDir/dirs/TTCIDFont";
my $FontDir = "$PkgDir/dirs/fonts";
-my $FontMap = "$FontDir/Fontmap";
-my $CIDFontMap = "$FontDir/CIDFnmap";
+my $FontMap = "$FontDir/Fontmap"; # F
+my $CIDFontMap = "$FontDir/CIDFnmap"; # FF
my $Subst4psprint = 0;
-# for gs8 or later
-my $FAPIfmap = "$FontDir/FAPIfontmap";
-my $Cidmap = "$FontDir/cidfmap";
+# For Ghostscript 8 or later
+my $FAPIfmap = "$FontDir/FAPIfontmap"; # FFF
+my $Cidfmap = "$FontDir/cidfmap"; # FFFF
sub init {
- unless ($Id) {
- $Id = defoma_id_open_cache();
- }
- unless ($IdCmap) {
- $IdCmap = defoma_id_open_cache('cmap');
- }
- unless ($Sb1) {
- $Sb1 = defoma_subst_open(rulename => 'psprint', threshold => 50,
- idobject => $Id, private => 1);
- }
- unless ($Sb2) {
- $Sb2 = defoma_subst_open(rulename => 'ghostscript', threshold => 30,
- idobject => $Id);
- }
-
- return 0;
+ unless ($Id) {
+ $Id = defoma_id_open_cache();
+ }
+ unless ($IdCmap) {
+ $IdCmap = defoma_id_open_cache('cmap');
+ }
+ unless ($Sb1) {
+ $Sb1 = defoma_subst_open(rulename => 'psprint', threshold => 50,
+ idobject => $Id, private => 1);
+ }
+ unless ($Sb2) {
+ $Sb2 = defoma_subst_open(rulename => 'ghostscript', threshold => 30,
+ idobject => $Id);
+ }
+
+ return 0;
}
sub term {
- my @list;
- my $i;
-
- if ($Id) {
- if (open(F, '>' . $FontMap) && open(FF, '>' . $CIDFontMap) &&
- open(FFF, '>' . $FAPIfmap)) {
- @list = defoma_id_get_font($Id, 'installed');
-
- foreach $i (@list) {
- next if ($Id->{2}->[$i] ne 'SrI');
- my $c = $Id->{4}->[$i];
- my $f;
- my @h;
- my $cmap;
- my @cmaplist;
- my $j;
- my @ch;
- my %hh;
-
- if ($c =~ /^(type1|type3|gsfontderivative)$/) {
- $f = $Id->{1}->[$i];
- $f =~ s/^.*\///;
- print F '/', $Id->{0}->[$i], ' (', $f, ") ;\n";
- } elsif ($c =~ /^truetype$/) {
- $f = $Id->{1}->[$i];
- # FIXME: need to support the sub font id for the collection.
- print FFF '/', $Id->{0}->[$i], ' << /Path (', $f, ') /FontType 1 /FAPI /FreeType /SubfontId ', '0' , " >> ;\n"
- } elsif ($c =~ /^(truetype-cjk|cid)$/) {
- $f = $Id->{1}->[$i];
-
- @h = split(/ +/, $Id->{7}->[$i]);
-
- print FF '/', $Id->{0}->[$i], ' (', $f, ') ';
- if ($c eq 'truetype-cjk') {
- print FF '/', $h[0], '-', $h[1], '-', $h[2];
- }
- print FF " ;\n";
-
- # for gs8
- ## FIXME: the font packages should probably provides
- ## a CIDSupplement information where the fonts
- ## actually supports.
- @cmaplist = defoma_id_get_font($IdCmap, 'installed');
- foreach $j (@cmaplist) {
- @ch = split(/ +/, $IdCmap->{7}->[$j]);
- if (!defined($hh{$ch[1]}) ||
- $hh{$ch[1]} < $ch[9]) {
- $hh{$ch[1]} = $ch[9];
- }
- }
+ my @list;
+ my $i;
+
+ if ($Id) {
+ if (open(F, '>' . $FontMap) && open(FF, '>' . $CIDFontMap) &&
+ open(FFF, '>' . $FAPIfmap) && open(FFFF, '>' . $Cidfmap)) {
+ @list = defoma_id_get_font($Id, 'installed');
+
+ foreach $i (@list) {
+ next if ($Id->{2}->[$i] ne 'SrI');
+ my $c = $Id->{4}->[$i];
+ my $f;
+ my @h;
+ my $cmap;
+ my @cmaplist;
+ my $j;
+ my @ch;
+ my %hh;
+
+ if ($c =~ /^(type1|type3|gsfontderivative)$/) {
+ $f = $Id->{1}->[$i];
+ $f =~ s/^.*\///;
+ #
+ # Spit out $FontDir/Fontmap
+ #
+ print F '/', $Id->{0}->[$i], ' (', $f, ") ;\n";
+ } elsif ($c =~ /^truetype$/) {
+ $f = $Id->{1}->[$i];
+ #
+ # Spit out $FontDir/FAPIfontmap
+ #
+ # FIXME: need to support the sub font id for the collection.
+ print FFF '/', $Id->{0}->[$i], ' << /Path (', $f, ') /FontType 1 /FAPI /FreeType /SubfontId ', '0' , " >> ;\n"
+ } elsif ($c =~ /^(truetype-cjk|cid)$/) {
+ $f = $Id->{1}->[$i];
+ @h = split(/ +/, $Id->{7}->[$i]);
+ #
+ # Spit out $FontDir/CIDFnmap
+ #
+ print FF '/', $Id->{0}->[$i], ' (', $f, ') ';
+ if ($c eq 'truetype-cjk') {
+ print FF '/', $h[0], '-', $h[1], '-', $h[2];
+ }
+ print FF " ;\n";
+ # For Ghostscript 8 or later
+ if ($c eq 'truetype-cjk') {
+ my @hints = defoma_id_get_hints( $Id, $i );
+ my $cidsupplement;
+ while (@hints) {
+ my $var = shift @hints;
+ if ($var eq "--CIDSupplement") {
+ $cidsupplement = shift @hints;
+ last;
+ }
}
+ unless (defined $cidsupplement) {
+ print STDERR "No CIDSupplement specified for $Id->{0}->[$i], defaulting to 0.\n";
+ $cidsupplement = 0;
+ }
+ #
+ # Spit out $FontDir/cidfmap
+ #
+ # FIXME: need to support the sub font id for the collection.
+ print FFFF '/', $Id->{0}->[$i], ' << /FileType /TrueType /Path (', $f, ') /SubfontID ', '0', ' /CSI [(', $h[6], ') ', $cidsupplement, "] >> ;\n";
+ }
}
-
- @list = defoma_id_get_font($Id, 'installed');
+ }
+
+ @list = defoma_id_get_font($Id, 'installed');
+
+ foreach $i (@list) {
+ next if ($Id->{2}->[$i] !~ /^.[aS]/);
- foreach $i (@list) {
- next if ($Id->{2}->[$i] !~ /^.[aS]/);
-
- my $c = $Id->{4}->[$i];
-
- if ($c =~ /^(truetype|type1|type3|gsfontderivative)$/) {
- print F '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ; \n";
- } elsif ($c =~ /^(truetype-cjk|cid)$/) {
- print FF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ;\n";
- }
-
+ my $c = $Id->{4}->[$i];
+ #
+ # Spit out aliases
+ #
+ if ($c =~ /^(truetype|type1|type3|gsfontderivative)$/) {
+ print F '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ; \n";
+ print FFF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ; \n";
+ } elsif ($c =~ /^(truetype-cjk|cid)$/) {
+ print FF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ;\n";
+ print FFFF '/', $Id->{0}->[$i], ' /', $Id->{5}->[$i], " ;\n";
}
-
- close F;
- close FF;
- close FFF;
- unlink($FontMap) unless(-s $FontMap);
- unlink($CIDFontMap) unless(-s $CIDFontMap);
- unlink($FAPIfmap) unless(-s $FAPIfmap);
- unlink($Cidmap) if (-f $Cidmap); # remove.
+
+ }
+
+ close F;
+ close FF;
+ close FFF;
+ close FFFF;
+ unlink($FontMap) unless(-s $FontMap);
+ unlink($CIDFontMap) unless(-s $CIDFontMap);
+ unlink($FAPIfmap) unless(-s $FAPIfmap);
+ unlink($Cidfmap) unless(-s $Cidfmap);
}
-
- defoma_id_close_cache($Id);
- $Id = 0;
- }
- if ($IdCmap) {
- defoma_id_close_cache($IdCmap);
- $IdCmap = 0;
- }
- if ($Sb1) {
- defoma_subst_close($Sb1);
- $Sb1 = 0;
- }
- if ($Sb2) {
- defoma_subst_close($Sb2);
- $Sb2 = 0;
- }
-
- return 0;
+
+ defoma_id_close_cache($Id);
+ $Id = 0;
+ }
+ if ($IdCmap) {
+ defoma_id_close_cache($IdCmap);
+ $IdCmap = 0;
+ }
+ if ($Sb1) {
+ defoma_subst_close($Sb1);
+ $Sb1 = 0;
+ }
+ if ($Sb2) {
+ defoma_subst_close($Sb2);
+ $Sb2 = 0;
+ }
+
+ return 0;
}
sub create_symlink {
- my $font = shift;
- my $dir = shift || $FontDir;
-
- if ($font =~ /^(.*)\/(.+)$/) {
- my $fontpath = $1;
- my $fontfile = $2;
- my $newfile = $dir . '/' . $fontfile;
-
- return 1 if (-e $newfile);
-
- symlink($font, $newfile) || return 1;
- } else {
- return 1;
- }
-
- return 0;
+ my $font = shift;
+ my $dir = shift || $FontDir;
+
+ if ($font =~ /^(.*)\/(.+)$/) {
+ my $fontpath = $1;
+ my $fontfile = $2;
+ my $newfile = $dir . '/' . $fontfile;
+
+ return 1 if (-e $newfile);
+
+ symlink($font, $newfile) || return 1;
+ } else {
+ return 1;
+ }
+
+ return 0;
}
sub remove_symlink {
- my $font = shift;
- my $dir = shift || $FontDir;
-
- if ($font =~ /^(.*)\/(.+)$/) {
- my $fontpath = $1;
- my $fontfile = $2;
- my $newfile = $dir . '/' . $fontfile;
-
- return 1 unless (-l $newfile);
-
- unlink($newfile);
- } else {
- return 1;
- }
-
- return 0;
+ my $font = shift;
+ my $dir = shift || $FontDir;
+
+ if ($font =~ /^(.*)\/(.+)$/) {
+ my $fontpath = $1;
+ my $fontfile = $2;
+ my $newfile = $dir . '/' . $fontfile;
+
+ return 1 unless (-l $newfile);
+
+ unlink($newfile);
+ } else {
+ return 1;
+ }
+
+ return 0;
}
sub register_ps {
- my $id = shift;
-
- defoma_font_register('postscript', '<gs>/' . $id, @_);
+ my $id = shift;
+
+ defoma_font_register('postscript', '<gs>/' . $id, @_);
}
sub unregister_ps {
- my $id = shift;
-
- if (defoma_font_if_register('postscript', '<gs>/' . $id)) {
- defoma_font_unregister('postscript', '<gs>/' . $id);
- }
+ my $id = shift;
+
+ if (defoma_font_if_register('postscript', '<gs>/' . $id)) {
+ defoma_font_unregister('postscript', '<gs>/' . $id);
+ }
}
sub t1_register {
- my $type = shift;
- my $font = shift;
- my $h = parse_hints_start(@_);
-
- my $fontname = $h->{FontName};
- return 1 unless ($fontname);
- $fontname =~ s/ .*//;
-
- my $priority = $h->{Priority} || 0;
-
- my %add;
- $add{hints} = join(' ', @_);
-
- if ($type eq 'gsfontderivative') {
- my $ofont = $h->{'GSF-OriginFont'};
- my $oid = $h->{'GSF-OriginID'};
-
- if ($ofont && $oid) {
- $add{depend} = $ofont.' '.$oid;
- } else {
- return 2;
- }
- }
-
- return 3 if (create_symlink($font));
-
- defoma_id_register($Id, type => 'real', font => $font, id => $fontname,
- priority => $priority, %add);
+ my $type = shift;
+ my $font = shift;
+ my $h = parse_hints_start(@_);
+
+ my $fontname = $h->{FontName};
+ return 1 unless ($fontname);
+ $fontname =~ s/ .*//;
+
+ my $priority = $h->{Priority} || 0;
+
+ my %add;
+ $add{hints} = join(' ', @_);
+
+ if ($type eq 'gsfontderivative') {
+ my $ofont = $h->{'GSF-OriginFont'};
+ my $oid = $h->{'GSF-OriginID'};
- my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : ();
- my $i;
-
- foreach $i (@alias) {
- defoma_id_register($Id, type => 'alias', font => $font, id => $i,
- priority => $priority, origin => $fontname);
+ if ($ofont && $oid) {
+ $add{depend} = $ofont.' '.$oid;
+ } else {
+ return 2;
}
-
- defoma_subst_register($Sb1, $font, $fontname);
- defoma_subst_register($Sb2, $font, $fontname);
-
- return 0;
+ }
+
+ return 3 if (create_symlink($font));
+
+ defoma_id_register($Id, type => 'real', font => $font, id => $fontname,
+ priority => $priority, %add);
+
+ my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : ();
+ my $i;
+
+ foreach $i (@alias) {
+ defoma_id_register($Id, type => 'alias', font => $font, id => $i,
+ priority => $priority, origin => $fontname);
+ }
+
+ defoma_subst_register($Sb1, $font, $fontname);
+ defoma_subst_register($Sb2, $font, $fontname);
+
+ return 0;
}
sub t1_unregister {
- my $font = shift;
-
- defoma_subst_unregister($Sb1, $font);
- defoma_subst_unregister($Sb2, $font);
- defoma_id_unregister($Id, type => 'alias', font => $font);
- defoma_id_unregister($Id, type => 'real', font => $font);
-
- remove_symlink($font);
-
- return 0;
+ my $font = shift;
+
+ defoma_subst_unregister($Sb1, $font);
+ defoma_subst_unregister($Sb2, $font);
+ defoma_id_unregister($Id, type => 'alias', font => $font);
+ defoma_id_unregister($Id, type => 'real', font => $font);
+
+ remove_symlink($font);
+
+ return 0;
}
sub t1_install {
- my $type = shift;
- my $font = shift;
- my $id = shift;
- my $depfont = shift;
- my $depid = shift;
- my @add = ();
-
- if ($type eq 'real') {
- return 0 if (grep($_ eq '--Alias', @_));
-
- $add[0] = '--RealName';
- }
-
- register_ps($id, @_, @add);
-
- return 0;
+ my $type = shift;
+ my $font = shift;
+ my $id = shift;
+ my $depfont = shift;
+ my $depid = shift;
+ my @add = ();
+
+ if ($type eq 'real') {
+ return 0 if (grep($_ eq '--Alias', @_));
+
+ $add[0] = '--RealName';
+ }
+
+ register_ps($id, @_, @add);
+
+ return 0;
}
sub t1_remove {
- my $type = shift;
- my $font = shift;
- my $id = shift;
- my $depfont = shift;
- my $depid = shift;
-
- unregister_ps($id);
-
- return 0;
+ my $type = shift;
+ my $font = shift;
+ my $id = shift;
+ my $depfont = shift;
+ my $depid = shift;
+
+ unregister_ps($id);
+
+ return 0;
}
sub type1 {
- my $com = shift;
-
- if ($com eq 'register') {
- return t1_register('type1', @_);
- } elsif ($com eq 'unregister') {
- return t1_unregister(@_);
- } elsif ($com =~ /^do-install-(.*)$/) {
- return t1_install($1, @_);
- } elsif ($com =~ /^do-remove-(.*)$/) {
- return t1_remove($1, @_);
- } elsif ($com eq 'init') {
- return init();
- } elsif ($com eq 'term') {
- return term();
- }
-
- return 0;
+ my $com = shift;
+
+ if ($com eq 'register') {
+ return t1_register('type1', @_);
+ } elsif ($com eq 'unregister') {
+ return t1_unregister(@_);
+ } elsif ($com =~ /^do-install-(.*)$/) {
+ return t1_install($1, @_);
+ } elsif ($com =~ /^do-remove-(.*)$/) {
+ return t1_remove($1, @_);
+ } elsif ($com eq 'init') {
+ return init();
+ } elsif ($com eq 'term') {
+ return term();
+ }
+
+ return 0;
}
sub type3 {
- return type1(@_);
+ return type1(@_);
}
sub gsfontderivative {
- my $com = shift;
-
- if ($com eq 'register') {
- return t1_register('gsfontderivative', @_);
- } else {
- return type1($com, @_);
- }
+ my $com = shift;
+
+ if ($com eq 'register') {
+ return t1_register('gsfontderivative', @_);
+ } else {
+ return type1($com, @_);
+ }
}
sub tt_register_cjk {
- my %addstr = ('Japanese' => '-Ja',
- 'Korean' => '-Ko',
- 'Chinese-China' => '-GB',
- 'Chinese-Taiwan' => '-CNS');
- my %ordering = ('Japanese' => 'Japan1',
- 'Korean' => 'Korea1',
- 'Chinese-China' => 'GB1',
- 'Chinese-Taiwan' => 'CNS1');
- my %coding = ('Unicode' => 'Unicode',
- 'BIG5' => 'Big5',
- 'ShiftJIS' => 'ShiftJIS',
- 'WanSung' => 'WanSung',
- 'Johab' => 'Johab');
-
- my $cnt = shift;
- my $loc = shift;
- my $font = shift;
- my $fontname = shift;
- my $alias = shift;
- my $charset = shift;
- my $encoding = shift;
- my $priority = shift;
-
- return $cnt unless (exists($addstr{$loc}) && exists($ordering{$loc}) &&
- exists($coding{$encoding}));
- my $ord = $ordering{$loc};
- my $enc = $coding{$encoding};
-
- my $add = '';
- $add = $addstr{$loc} if ($cnt > 0);
-
- my @hints = ('Adobe', $ord, $enc,
- '--CIDRegistry', 'Adobe', '--CIDOrdering', $ord);
-
- defoma_id_register($Id, type => 'real', font => $font,
- id => $fontname . $add, priority => $priority,
+ my %addstr = ('Japanese' => '-Ja',
+ 'Korean' => '-Ko',
+ 'Chinese-China' => '-GB',
+ 'Chinese-Taiwan' => '-CNS');
+ my %ordering = ('Japanese' => 'Japan1',
+ 'Korean' => 'Korea1',
+ 'Chinese-China' => 'GB1',
+ 'Chinese-Taiwan' => 'CNS1');
+ my %coding = ('Unicode' => 'Unicode',
+ 'BIG5' => 'Big5',
+ 'ShiftJIS' => 'ShiftJIS',
+ 'WanSung' => 'WanSung',
+ 'Johab' => 'Johab');
+
+ my $cnt = shift;
+ my $loc = shift;
+ my $font = shift;
+ my $fontname = shift;
+ my $alias = shift;
+ my $charset = shift;
+ my $encoding = shift;
+ my $priority = shift;
+
+ return $cnt unless (exists($addstr{$loc}) && exists($ordering{$loc}) &&
+ exists($coding{$encoding}));
+ my $ord = $ordering{$loc};
+ my $enc = $coding{$encoding};
+
+ my $add = '';
+ $add = $addstr{$loc} if ($cnt > 0);
+
+ my @hints = ('Adobe', $ord, $enc,
+ '--CIDRegistry', 'Adobe', '--CIDOrdering', $ord);
+
+ defoma_id_register($Id, type => 'real', font => $font,
+ id => $fontname . $add, priority => $priority,
+ category => 'truetype-cjk',
+ hints => join(' ', @hints, @_));
+
+ foreach my $i (@{$alias}) {
+ defoma_id_register($Id, type => 'alias', font => $font,
+ id => $i . $add, priority => $priority,
category => 'truetype-cjk',
- hints => join(' ', @hints, @_));
-
- foreach my $i (@{$alias}) {
- defoma_id_register($Id, type => 'alias', font => $font,
- id => $i . $add, priority => $priority,
- category => 'truetype-cjk',
- origin => $fontname . $add);
- }
-
- defoma_subst_register($Sb1, $font, $fontname . $add);
- defoma_subst_register($Sb2, $font, $fontname . $add);
-
- $cnt++;
- return $cnt unless ($charset =~ /JISX0212/ && $loc eq 'Japanese' &&
- $encoding eq 'Unicode');
-
- $add = '-JaH';
- @hints = ('Adobe', 'Japan2', 'Unicode',
- '--CIDRegistry', 'Adobe', '--CIDOrdering', 'Japan2');
-
- defoma_id_register($Id, type => 'real', font => $font,
- id => $fontname . $add, priority => $priority,
+ origin => $fontname . $add);
+ }
+
+ defoma_subst_register($Sb1, $font, $fontname . $add);
+ defoma_subst_register($Sb2, $font, $fontname . $add);
+
+ $cnt++;
+ return $cnt unless ($charset =~ /JISX0212/ && $loc eq 'Japanese' &&
+ $encoding eq 'Unicode');
+
+ $add = '-JaH';
+ @hints = ('Adobe', 'Japan2', 'Unicode',
+ '--CIDRegistry', 'Adobe', '--CIDOrdering', 'Japan2');
+
+ defoma_id_register($Id, type => 'real', font => $font,
+ id => $fontname . $add, priority => $priority,
+ category => 'truetype-cjk',
+ hints => join(' ', @hints, @_));
+
+ foreach my $i (@{$alias}) {
+ defoma_id_register($Id, type => 'alias', font => $font,
+ id => $i . $add, priority => $priority,
category => 'truetype-cjk',
- hints => join(' ', @hints, @_));
-
- foreach my $i (@{$alias}) {
- defoma_id_register($Id, type => 'alias', font => $font,
- id => $i . $add, priority => $priority,
- category => 'truetype-cjk',
- origin => $fontname . $add);
- }
-
- defoma_subst_register($Sb1, $font, $fontname . $add);
- defoma_subst_register($Sb2, $font, $fontname . $add);
-
- $cnt++;
- return $cnt;
+ origin => $fontname . $add);
+ }
+
+ defoma_subst_register($Sb1, $font, $fontname . $add);
+ defoma_subst_register($Sb2, $font, $fontname . $add);
+
+ $cnt++;
+ return $cnt;
}
sub tt_register {
- my $font = shift;
- my $h = parse_hints_start(@_);
- my $i;
-
- my $fontname = $h->{FontName};
- my $location = $h->{Location};
- my $encoding = $h->{Encoding};
- my $priority = $h->{Priority} || 0;
- my $charset = $h->{Charset};
-
- return 1 unless ($fontname && $location && $encoding);
- $fontname =~ s/ .*//;
- my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : ();
-
- return 2 if (create_symlink($font));
+ my $font = shift;
+ my $h = parse_hints_start(@_);
+ my $i;
+
+ my $fontname = $h->{FontName};
+ my $location = $h->{Location};
+ my $encoding = $h->{Encoding};
+ my $priority = $h->{Priority} || 0;
+ my $charset = $h->{Charset};
+
+ return 1 unless ($fontname && $location && $encoding);
+ $fontname =~ s/ .*//;
+ my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : ();
+
+ return 2 if (create_symlink($font));
+
+ parse_hints_cut($h, 'Encoding', 'Location', 'FontName');
+ my @hints;
+
+ if ($location !~ /Japanese|Korean|Chinese/) {
+ @hints = parse_hints_build($h);
- parse_hints_cut($h, 'Encoding', 'Location', 'FontName');
- my @hints;
+ defoma_id_register($Id, type => 'real', font => $font, id => $fontname,
+ priority => $priority, hints => join(' ', @hints));
- if ($location !~ /Japanese|Korean|Chinese/) {
- @hints = parse_hints_build($h);
-
- defoma_id_register($Id, type => 'real', font => $font, id => $fontname,
- priority => $priority, hints => join(' ', @hints));
-
- foreach $i (@alias) {
- defoma_id_register($Id, type => 'alias', font => $font, id => $i,
- priority => $priority, origin => $fontname);
- }
-
- defoma_subst_register($Sb1, $font, $fontname);
- defoma_subst_register($Sb2, $font, $fontname);
- } else {
- parse_hints_cut($h, 'Charset');
- @hints = parse_hints_build($h);
-
- my $loc;
- my @locs = split(/ /, $location);
- my $cnt = 0;
-
- foreach $loc (@locs) {
- $cnt = tt_register_cjk($cnt, $loc, $font, $fontname, \@alias,
- $charset, $encoding, $priority, @hints);
- }
+ foreach $i (@alias) {
+ defoma_id_register($Id, type => 'alias', font => $font, id => $i,
+ priority => $priority, origin => $fontname);
}
-
- return 0;
+
+ defoma_subst_register($Sb1, $font, $fontname);
+ defoma_subst_register($Sb2, $font, $fontname);
+ } else {
+ parse_hints_cut($h, 'Charset');
+ @hints = parse_hints_build($h);
+
+ my $loc;
+ my @locs = split(/ /, $location);
+ my $cnt = 0;
+
+ foreach $loc (@locs) {
+ $cnt = tt_register_cjk($cnt, $loc, $font, $fontname, \@alias,
+ $charset, $encoding, $priority, @hints);
+ }
+ }
+
+ return 0;
}
sub tt_unregister {
- my $font = shift;
-
- defoma_subst_unregister($Sb1, $font);
- defoma_subst_unregister($Sb2, $font);
- defoma_id_unregister($Id, type => 'alias', font => $font);
- defoma_id_unregister($Id, type => 'real', font => $font);
-
- remove_symlink($font);
-
- return 0;
+ my $font = shift;
+
+ defoma_subst_unregister($Sb1, $font);
+ defoma_subst_unregister($Sb2, $font);
+ defoma_id_unregister($Id, type => 'alias', font => $font);
+ defoma_id_unregister($Id, type => 'real', font => $font);
+
+ remove_symlink($font);
+
+ return 0;
}
sub tt_install {
- my $type = shift;
- my $font = shift;
- my $id = shift;
- my $depfont = shift;
- my $depid = shift;
-
- my @add = ();
-
- $add[0] = '--RealName' if ($type eq 'real');
-
- register_ps($id, @_, @add);
-
- return 0;
+ my $type = shift;
+ my $font = shift;
+ my $id = shift;
+ my $depfont = shift;
+ my $depid = shift;
+
+ my @add = ();
+
+ $add[0] = '--RealName' if ($type eq 'real');
+
+ register_ps($id, @_, @add);
+
+ return 0;
}
sub tt_remove {
- my $type = shift;
- my $font = shift;
- my $id = shift;
- my $depfont = shift;
- my $depid = shift;
-
- unregister_ps($id);
-
- return 0;
+ my $type = shift;
+ my $font = shift;
+ my $id = shift;
+ my $depfont = shift;
+ my $depid = shift;
+
+ unregister_ps($id);
+
+ return 0;
}
sub truetype {
- my $com = shift;
-
- if ($com eq 'register') {
- return tt_register(@_);
- } elsif ($com eq 'unregister') {
- return tt_unregister(@_);
- } elsif ($com =~ /^do-install-(.*)$/) {
- return tt_install($1, @_);
- } elsif ($com =~ /^do-remove-(.*)$/) {
- return tt_remove($1, @_);
- } elsif ($com eq 'init') {
- return init();
- } elsif ($com eq 'term') {
- return term();
- }
-
- return 0;
+ my $com = shift;
+
+ if ($com eq 'register') {
+ return tt_register(@_);
+ } elsif ($com eq 'unregister') {
+ return tt_unregister(@_);
+ } elsif ($com =~ /^do-install-(.*)$/) {
+ return tt_install($1, @_);
+ } elsif ($com =~ /^do-remove-(.*)$/) {
+ return tt_remove($1, @_);
+ } elsif ($com eq 'init') {
+ return init();
+ } elsif ($com eq 'term') {
+ return term();
+ }
+
+ return 0;
}
sub truetype_cjk {
- my $com = shift;
+ my $com = shift;
+
+ if ($com =~ /^do-install-(.*)$/) {
+ return cid_install($1, @_);
+ } elsif ($com =~ /^do-remove-(.*)$/) {
+ return cid_remove($1, @_);
+ } elsif ($com eq 'init') {
+ return init();
+ } elsif ($com eq 'term') {
+ return term();
+ }
- if ($com =~ /^do-install-(.*)$/) {
- return cid_install($1, @_);
- } elsif ($com =~ /^do-remove-(.*)$/) {
- return cid_remove($1, @_);
- } elsif ($com eq 'init') {
- return init();
- } elsif ($com eq 'term') {
- return term();
- }
-
- return 0;
+ return 0;
}
sub cid_register {
- my $type = shift;
- my $font = shift;
- my $h = parse_hints_start(@_);
-
- my $fontname = $h->{FontName};
- my $registry = $h->{CIDRegistry};
- my $ordering = $h->{CIDOrdering};
- my $priority = $h->{Priority} || 0;
-
- return 1 unless($fontname && $registry && $ordering);
- $fontname =~ s/ .*//;
- $registry =~ s/ .*//;
- $ordering =~ s/ .*//;
- my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : ();
-
- return 2 if (create_symlink($font));
-
- parse_hints_cut($h, 'PSCharset', 'PSEncoding', 'Charset', 'Encoding');
- my @hints = parse_hints_build($h);
- @hints = ($registry, $ordering, '.', @hints);
-
- defoma_id_register($Id, type => 'real', font => $font,
- id => $fontname, priority => $priority,
- category => $type, hints => join(' ', @hints));
-
- my $i;
- foreach $i (@alias) {
- defoma_id_register($Id, type => 'alias', font => $font, id => $i,
- priority => $priority, origin => $fontname,
- category => $type);
- }
+ my $type = shift;
+ my $font = shift;
+ my $h = parse_hints_start(@_);
+
+ my $fontname = $h->{FontName};
+ my $registry = $h->{CIDRegistry};
+ my $ordering = $h->{CIDOrdering};
+ my $priority = $h->{Priority} || 0;
+
+ return 1 unless($fontname && $registry && $ordering);
+ $fontname =~ s/ .*//;
+ $registry =~ s/ .*//;
+ $ordering =~ s/ .*//;
+ my @alias = ($h->{Alias}) ? split(/ +/, $h->{Alias}) : ();
+
+ return 2 if (create_symlink($font));
+
+ parse_hints_cut($h, 'PSCharset', 'PSEncoding', 'Charset', 'Encoding');
+ my @hints = parse_hints_build($h);
+ @hints = ($registry, $ordering, '.', @hints);
+
+ defoma_id_register($Id, type => 'real', font => $font,
+ id => $fontname, priority => $priority,
+ category => $type, hints => join(' ', @hints));
+
+ my $i;
+ foreach $i (@alias) {
+ defoma_id_register($Id, type => 'alias', font => $font, id => $i,
+ priority => $priority, origin => $fontname,
+ category => $type);
+ }
- defoma_subst_register($Sb1, $font, $fontname);
- defoma_subst_register($Sb2, $font, $fontname);
+ defoma_subst_register($Sb1, $font, $fontname);
+ defoma_subst_register($Sb2, $font, $fontname);
- return 0;
+ return 0;
}
sub cid_unregister {
- my $font = shift;
+ my $font = shift;
- defoma_subst_unregister($Sb1, $font);
- defoma_subst_unregister($Sb2, $font);
- defoma_id_unregister($Id, type => 'alias', font => $font);
- defoma_id_unregister($Id, type => 'real', font => $font);
+ defoma_subst_unregister($Sb1, $font);
+ defoma_subst_unregister($Sb2, $font);
+ defoma_id_unregister($Id, type => 'alias', font => $font);
+ defoma_id_unregister($Id, type => 'real', font => $font);
- remove_symlink($font);
+ remove_symlink($font);
- return 0;
+ return 0;
}
sub cid_install_all {
- my $type = shift;
- my $id = shift;
- my $registry = shift;
- my $ordering = shift;
-
- my @cmaps = defoma_id_get_font($IdCmap, 'installed');
- foreach my $c (@cmaps) {
- my @chs = split(/ +/, $IdCmap->{7}->[$c]);
+ my $type = shift;
+ my $id = shift;
+ my $registry = shift;
+ my $ordering = shift;
+
+ my @cmaps = defoma_id_get_font($IdCmap, 'installed');
+ foreach my $c (@cmaps) {
+ my @chs = split(/ +/, $IdCmap->{7}->[$c]);
- next if ($chs[0] ne $registry);
- next if ($chs[1] ne $ordering && $chs[1] ne 'Identity');
+ next if ($chs[0] ne $registry);
+ next if ($chs[1] ne $ordering && $chs[1] ne 'Identity');
- shift(@chs);
- shift(@chs);
+ shift(@chs);
+ shift(@chs);
- my $psname = $id . '-' . $IdCmap->{0}->[$c];
+ my $psname = $id . '-' . $IdCmap->{0}->[$c];
- my @add = ();
- $add[0] = '--RealName' if ($type eq 'real');
+ my @add = ();
+ $add[0] = '--RealName' if ($type eq 'real');
- register_ps($psname, @_, @add, @chs);
- }
+ register_ps($psname, @_, @add, @chs);
+ }
- return 0;
+ return 0;
}
sub cid_remove_all {
- my $type = shift;
- my $id = shift;
- my $registry = shift;
- my $ordering = shift;
+ my $type = shift;
+ my $id = shift;
+ my $registry = shift;
+ my $ordering = shift;
- my @cmaps = defoma_id_get_font($IdCmap, 'installed');
- foreach my $c (@cmaps) {
- my @chs = split(/ +/, $IdCmap->{7}->[$c]);
+ my @cmaps = defoma_id_get_font($IdCmap, 'installed');
+ foreach my $c (@cmaps) {
+ my @chs = split(/ +/, $IdCmap->{7}->[$c]);
- next if ($chs[0] ne $registry);
- next if ($chs[1] ne $ordering && $chs[1] ne 'Identity');
+ next if ($chs[0] ne $registry);
+ next if ($chs[1] ne $ordering && $chs[1] ne 'Identity');
- my $psname = $id . '-' . $IdCmap->{0}->[$c];
+ my $psname = $id . '-' . $IdCmap->{0}->[$c];
- unregister_ps($psname);
- }
+ unregister_ps($psname);
+ }
- return 0;
+ return 0;
}
sub cid_install {
- my $type = shift;
- my $font = shift;
- my $id = shift;
- my $depfont = shift;
- my $depid = shift;
- my $registry = shift;
- my $ordering = shift;
- my $encoding = shift;
+ my $type = shift;
+ my $font = shift;
+ my $id = shift;
+ my $depfont = shift;
+ my $depid = shift;
+ my $registry = shift;
+ my $ordering = shift;
+ my $encoding = shift;
- cid_install_all($type, $id, $registry, $ordering, @_);
+ cid_install_all($type, $id, $registry, $ordering, @_);
- return 0;
+ return 0;
}
sub cid_remove {
- my $type = shift;
- my $font = shift;
- my $id = shift;
- my $depfont = shift;
- my $depid = shift;
- my $registry = shift;
- my $ordering = shift;
- my $encoding = shift;
+ my $type = shift;
+ my $font = shift;
+ my $id = shift;
+ my $depfont = shift;
+ my $depid = shift;
+ my $registry = shift;
+ my $ordering = shift;
+ my $encoding = shift;
- cid_remove_all($type, $id, $registry, $ordering);
+ cid_remove_all($type, $id, $registry, $ordering);
- return 0;
+ return 0;
}
sub cid {
- my $com = shift;
+ my $com = shift;
- if ($com eq 'register') {
- return cid_register('cid', @_);
- } elsif ($com eq 'unregister') {
- return cid_unregister(@_);
- } elsif ($com =~ /^do-install-(.*)$/) {
- return cid_install($1, @_);
- } elsif ($com =~ /^do-remove-(.*)$/) {
- return cid_remove($1, @_);
- } elsif ($com eq 'init') {
- return init();
- } elsif ($com eq 'term') {
- return term();
- }
+ if ($com eq 'register') {
+ return cid_register('cid', @_);
+ } elsif ($com eq 'unregister') {
+ return cid_unregister(@_);
+ } elsif ($com =~ /^do-install-(.*)$/) {
+ return cid_install($1, @_);
+ } elsif ($com =~ /^do-remove-(.*)$/) {
+ return cid_remove($1, @_);
+ } elsif ($com eq 'init') {
+ return init();
+ } elsif ($com eq 'term') {
+ return term();
+ }
- return 0;
+ return 0;
}
sub cmap_register {
- my $font = shift;
+ my $font = shift;
- if ($font =~ /\/gs-cjk-resource\//) {
- return 2 if (create_symlink($font, $CMapDir));
- return 0;
- }
+ if ($font =~ /\/gs-cjk-resource\//) {
+ return 2 if (create_symlink($font, $CMapDir));
+ return 0;
+ }
- my $h = parse_hints_start(@_);
+ my $h = parse_hints_start(@_);
- my $cmap = $h->{CMapName};
- my $reg = $h->{CIDRegistry};
- my $ord = $h->{CIDOrdering};
+ my $cmap = $h->{CMapName};
+ my $reg = $h->{CIDRegistry};
+ my $ord = $h->{CIDOrdering};
- return 1 unless ($cmap && $reg && $ord);
- $reg =~ s/ .*//;
- $ord =~ s/ .*//;
- $cmap =~ s/ .*//;
+ return 1 unless ($cmap && $reg && $ord);
+ $reg =~ s/ .*//;
+ $ord =~ s/ .*//;
+ $cmap =~ s/ .*//;
- my @hints = ($reg, $ord, @_);
+ my @hints = ($reg, $ord, @_);
- defoma_id_register($IdCmap, type => 'real', font => $font, id => $cmap,
- priority => 0, hints => join(' ', @hints));
+ defoma_id_register($IdCmap, type => 'real', font => $font, id => $cmap,
+ priority => 0, hints => join(' ', @hints));
- return 0;
+ return 0;
}
sub cmap_unregister {
- my $font = shift;
+ my $font = shift;
- if ($font =~ /\/gs-cjk-resource\//) {
- remove_symlink($font, $CMapDir);
- return 0;
- }
+ if ($font =~ /\/gs-cjk-resource\//) {
+ remove_symlink($font, $CMapDir);
+ return 0;
+ }
- defoma_id_unregister($IdCmap, type => 'real', font => $font);
+ defoma_id_unregister($IdCmap, type => 'real', font => $font);
- return 0;
+ return 0;
}
sub cmap_install {
- my $font = shift;
- my $cmap = shift;
- my $df = shift;
- my $di = shift;
- my $reg = shift;
- my $ord = shift;
- my %hash;
- my @nonreal = ();
-
- return 1 if (create_symlink($font, $CMapDir));
-
- my @list = (defoma_id_get_font($Id, 'installed', f4 => 'cid'),
- defoma_id_get_font($Id, 'installed', f4 => 'truetype-cjk'));
-
- foreach my $i (@list) {
- my $type = $Id->{2}->[$i];
- my $id = $Id->{0}->[$i];
+ my $font = shift;
+ my $cmap = shift;
+ my $df = shift;
+ my $di = shift;
+ my $reg = shift;
+ my $ord = shift;
+ my %hash;
+ my @nonreal = ();
+
+ return 1 if (create_symlink($font, $CMapDir));
+
+ my @list = (defoma_id_get_font($Id, 'installed', f4 => 'cid'),
+ defoma_id_get_font($Id, 'installed', f4 => 'truetype-cjk'));
+
+ foreach my $i (@list) {
+ my $type = $Id->{2}->[$i];
+ my $id = $Id->{0}->[$i];
- if ($type ne 'SrI') {
- push(@nonreal, $i);
- next;
- }
+ if ($type ne 'SrI') {
+ push(@nonreal, $i);
+ next;
+ }
- my @hints = split(/ +/, $Id->{7}->[$i]);
+ my @hints = split(/ +/, $Id->{7}->[$i]);
- next if ($hints[0] ne $reg);
- next if ($hints[1] ne $ord && $ord ne 'Identity');
+ next if ($hints[0] ne $reg);
+ next if ($hints[1] ne $ord && $ord ne 'Identity');
- $hash{$id} = $i;
+ $hash{$id} = $i;
- shift(@hints);
- shift(@hints);
- shift(@hints);
+ shift(@hints);
+ shift(@hints);
+ shift(@hints);
- my $psname = $id . '-' . $cmap;
+ my $psname = $id . '-' . $cmap;
- register_ps($psname, @hints, '--RealName', @_);
- }
+ register_ps($psname, @hints, '--RealName', @_);
+ }
- foreach my $i (@nonreal) {
- my $depid = $Id->{5}->[$i];
- next unless (exists($hash{$depid}));
+ foreach my $i (@nonreal) {
+ my $depid = $Id->{5}->[$i];
+ next unless (exists($hash{$depid}));
- my @hints = split(/ +/, $Id->{7}->[$hash{$depid}]);
+ my @hints = split(/ +/, $Id->{7}->[$hash{$depid}]);
- next if ($hints[0] ne $reg);
- next if ($hints[1] ne $ord && $ord ne 'Identity');
+ next if ($hints[0] ne $reg);
+ next if ($hints[1] ne $ord && $ord ne 'Identity');
- shift(@hints);
- shift(@hints);
- shift(@hints);
+ shift(@hints);
+ shift(@hints);
+ shift(@hints);
- my $psname = $Id->{0}->[$i] . '-' . $cmap;
+ my $psname = $Id->{0}->[$i] . '-' . $cmap;
- register_ps($psname, @hints, @_);
- }
+ register_ps($psname, @hints, @_);
+ }
- return 0;
+ return 0;
}
sub cmap_remove {
- my $font = shift;
- my $cmap = shift;
- my $df = shift;
- my $di = shift;
- my $reg = shift;
- my $ord = shift;
- my %hash;
+ my $font = shift;
+ my $cmap = shift;
+ my $df = shift;
+ my $di = shift;
+ my $reg = shift;
+ my $ord = shift;
+ my %hash;
- remove_symlink($font, $CMapDir);
+ remove_symlink($font, $CMapDir);
- my @list = (defoma_id_get_font($Id, 'installed', f4 => 'cid'),
- defoma_id_get_font($Id, 'installed', f4 => 'truetype-cjk'));
+ my @list = (defoma_id_get_font($Id, 'installed', f4 => 'cid'),
+ defoma_id_get_font($Id, 'installed', f4 => 'truetype-cjk'));
- foreach my $i (@list) {
- my @hints = split(/ +/, $Id->{7}->[$i]);
+ foreach my $i (@list) {
+ my @hints = split(/ +/, $Id->{7}->[$i]);
- if (@hints > 0) {
- next if ($hints[0] ne $reg);
- next if ($hints[1] ne $ord && $ord ne 'Identity');
- }
+ if (@hints > 0) {
+ next if ($hints[0] ne $reg);
+ next if ($hints[1] ne $ord && $ord ne 'Identity');
+ }
- my $psname = $Id->{0}->[$i] . '-' . $cmap;
+ my $psname = $Id->{0}->[$i] . '-' . $cmap;
- unregister_ps($psname);
- }
+ unregister_ps($psname);
+ }
- return 0;
+ return 0;
}
sub cmap {
- my $com = shift;
+ my $com = shift;
- if ($com eq 'register') {
- return cmap_register(@_);
- } elsif ($com eq 'unregister') {
- return cmap_unregister(@_);
- } elsif ($com eq 'do-install-real') {
- return cmap_install(@_);
- } elsif ($com eq 'do-remove-real') {
- return cmap_remove(@_);
- } elsif ($com eq 'init') {
- return init();
- } elsif ($com eq 'term') {
- return term();
- }
+ if ($com eq 'register') {
+ return cmap_register(@_);
+ } elsif ($com eq 'unregister') {
+ return cmap_unregister(@_);
+ } elsif ($com eq 'do-install-real') {
+ return cmap_install(@_);
+ } elsif ($com eq 'do-remove-real') {
+ return cmap_remove(@_);
+ } elsif ($com eq 'init') {
+ return init();
+ } elsif ($com eq 'term') {
+ return term();
+ }
- return 0;
+ return 0;
}
sub psprint_register {
- my $font = shift;
- return 0 unless ($Subst4psprint);
- return 1 if ($font !~ /(.+)\/(.+)/);
-
- return 0 if ($1 eq '<gs>');
- my $fontname = $2;
-
- return 2 if ($Sb1->grep_rule('', $fontname));
-
- my @hints;
- my $h = parse_hints_start(@_);
- my $cset = $h->{PSCharset};
- my $enc = $h->{PSEncoding};
-
- if ($cset && $enc && $cset =~ /^Adobe-([^-]+).*$/) {
- my $ord = $1;
- $fontname =~ s/-$enc$//;
-
- parse_hints_cut($h, 'PSCharset', 'PSEncoding', 'Charset', 'Encoding',
- 'Direction');
- @hints = parse_hints_build($h);
- push(@hints, '--CIDRegistry,*', 'Adobe', '--CIDOrdering,*', $ord);
- } else {
- @hints = @_;
- }
-
- for my $i (@hints) {
- $i = '--Charset,*' if ($i eq '--Charset');
- $i = '--Encoding,*' if ($i eq '--Encoding');
- $i = '--Direction,*' if ($i eq '--Direction');
- $i = '--Shape,2' if ($i eq '--Shape');
- }
+ my $font = shift;
+ return 0 unless ($Subst4psprint);
+ return 1 if ($font !~ /(.+)\/(.+)/);
+
+ return 0 if ($1 eq '<gs>');
+ my $fontname = $2;
+
+ return 2 if ($Sb1->grep_rule('', $fontname));
+
+ my @hints;
+ my $h = parse_hints_start(@_);
+ my $cset = $h->{PSCharset};
+ my $enc = $h->{PSEncoding};
+
+ if ($cset && $enc && $cset =~ /^Adobe-([^-]+).*$/) {
+ my $ord = $1;
+ $fontname =~ s/-$enc$//;
+
+ parse_hints_cut($h, 'PSCharset', 'PSEncoding', 'Charset', 'Encoding',
+ 'Direction');
+ @hints = parse_hints_build($h);
+ push(@hints, '--CIDRegistry,*', 'Adobe', '--CIDOrdering,*', $ord);
+ } else {
+ @hints = @_;
+ }
+
+ for my $i (@hints) {
+ $i = '--Charset,*' if ($i eq '--Charset');
+ $i = '--Encoding,*' if ($i eq '--Encoding');
+ $i = '--Direction,*' if ($i eq '--Direction');
+ $i = '--Shape,2' if ($i eq '--Shape');
+ }
- defoma_subst_add_rule($Sb1, $fontname, @hints);
+ defoma_subst_add_rule($Sb1, $fontname, @hints);
- return 0;
+ return 0;
}
sub psprint_unregister {
- my $font = shift;
- return 0 if ($font !~ /(.+)\/(.+)/);
+ my $font = shift;
+ return 0 if ($font !~ /(.+)\/(.+)/);
- return 0 if ($1 eq '<gs>');
- my $fontname = $2;
+ return 0 if ($1 eq '<gs>');
+ my $fontname = $2;
- my $h = parse_hints_start(@_);
- my $cset = $h->{PSCharset};
- my $enc = $h->{PSEncoding};
+ my $h = parse_hints_start(@_);
+ my $cset = $h->{PSCharset};
+ my $enc = $h->{PSEncoding};
- if ($cset && $enc && $cset =~ /^Adobe-.*$/) {
- $fontname =~ s/-$enc$//;
- }
+ if ($cset && $enc && $cset =~ /^Adobe-.*$/) {
+ $fontname =~ s/-$enc$//;
+ }
- defoma_subst_remove_rule($Sb1, $fontname);
+ defoma_subst_remove_rule($Sb1, $fontname);
- return 0;
+ return 0;
}
sub psprint {
- my $com = shift;
-
- if ($com eq 'register') {
- return psprint_register(@_);
- } elsif ($com eq 'unregister') {
- return psprint_unregister(@_);
- } elsif ($com eq 'init') {
- return init();
- } elsif ($com eq 'term') {
- return term();
- }
-
- return 0;
+ my $com = shift;
+
+ if ($com eq 'register') {
+ return psprint_register(@_);
+ } elsif ($com eq 'unregister') {
+ return psprint_unregister(@_);
+ } elsif ($com eq 'init') {
+ return init();
+ } elsif ($com eq 'term') {
+ return term();
+ }
+
+ return 0;
}
1;
Modified: gs-common/trunk/debian/links
==============================================================================
--- gs-common/trunk/debian/links (original)
+++ gs-common/trunk/debian/links Sun Oct 22 23:23:49 2006
@@ -1,3 +1,4 @@
+usr/bin/ps2ascii usr/bin/ps2txt
var/lib/defoma/gs.d/dirs/CMap usr/share/ghostscript/CMap
usr/share/man/de/man1/ps2ps.1.gz usr/share/man/de/man1/eps2eps.1.gz
usr/share/man/de/man1/ps2pdf.1.gz usr/share/man/de/man1/ps2pdf12.1.gz
Modified: gs-common/trunk/man/de/dvipdf.1
==============================================================================
--- gs-common/trunk/man/de/dvipdf.1 (original)
+++ gs-common/trunk/man/de/dvipdf.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: dvipdf.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: dvipdf.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH DVIPDF 1 "8.Juli 2002" 7.21 Ghostscript \" -*- nroff -*-
@@ -26,6 +26,6 @@
.SH VERSION
Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Diese Manpage ist von George Ferguson.
Modified: gs-common/trunk/man/de/font2c.1
==============================================================================
--- gs-common/trunk/man/de/font2c.1 (original)
+++ gs-common/trunk/man/de/font2c.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: font2c.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: font2c.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH FONT2C 1 "8.Juli 2002" 7.21 Ghostscript \" -*- nroff -*-
@@ -21,7 +21,7 @@
.SH VERSION
Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchfgesehen.
.SH AUTHOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Diese Manpage ist von George Ferguson.
Modified: gs-common/trunk/man/de/gsnd.1
==============================================================================
--- gs-common/trunk/man/de/gsnd.1 (original)
+++ gs-common/trunk/man/de/gsnd.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: gsnd.1,v 1.4 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: gsnd.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH GSND 1 "8.Juli 2002" 7.21 Ghostscript \" -*- nroff -*-
@@ -17,6 +17,6 @@
.SH VERSION
Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
.SH AUTHOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Diese Manpage ist von George Ferguson.
Modified: gs-common/trunk/man/de/pdf2dsc.1
==============================================================================
--- gs-common/trunk/man/de/pdf2dsc.1 (original)
+++ gs-common/trunk/man/de/pdf2dsc.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: pdf2dsc.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: pdf2dsc.1 6300 2005-12-28 19:56:24Z giles $
.TH PDF2DSC 1 "8.Juli 2002" 7.21 "Ghostscript-Werkzeuge" \" -*- nroff -*-
.SH NAME
pdf2dsc \- erzeugt eine PostScript-Seitenliste aus einem PDF-Dokument
Modified: gs-common/trunk/man/de/pdf2ps.1
==============================================================================
--- gs-common/trunk/man/de/pdf2ps.1 (original)
+++ gs-common/trunk/man/de/pdf2ps.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: pdf2ps.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: pdf2ps.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH PDF2PS 1 "8.Juli 2002" 7.21 "Ghostscript Tools" \" -*- nroff -*-
@@ -18,5 +18,5 @@
.SH VERSION
Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren of Ghostscript.
Modified: gs-common/trunk/man/de/pdfopt.1
==============================================================================
--- gs-common/trunk/man/de/pdfopt.1 (original)
+++ gs-common/trunk/man/de/pdfopt.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: pdfopt.1,v 1.2 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: pdfopt.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH PDFOPT 1 "8.Juli 2002" 7.21 "Ghostscript-Werkzeuge" \" -*- nroff -*-
@@ -26,5 +26,5 @@
.SH VERSION
Dies Dokument wurde zuletzt für Ghostscript version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren of Ghostscript.
Modified: gs-common/trunk/man/de/printafm.1
==============================================================================
--- gs-common/trunk/man/de/printafm.1 (original)
+++ gs-common/trunk/man/de/printafm.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: printafm.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: printafm.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH PRINTAFM 1 "8.Juli 2002" 7.21 Ghostscript \" -*- nroff -*-
@@ -15,7 +15,7 @@
.SH VERSION
Das Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Diese Manpage ist von George Ferguson.
Modified: gs-common/trunk/man/de/ps2ascii.1
==============================================================================
--- gs-common/trunk/man/de/ps2ascii.1 (original)
+++ gs-common/trunk/man/de/ps2ascii.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: ps2ascii.1,v 1.2 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: ps2ascii.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH PS2ASCII 1 "8.Juli 2002" 7.21 "Ghostscript-Werkzeuge" \" -*- nroff -*-
@@ -27,7 +27,7 @@
.SH VERSION
Dies Dokument wurde zuletzt für Ghostscript version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
David M. Jones <dmjones at theory.lcs.mit.edu> verbesserte \fBps2ascii\fR
substanziell.
Modified: gs-common/trunk/man/de/ps2pdf.1
==============================================================================
--- gs-common/trunk/man/de/ps2pdf.1 (original)
+++ gs-common/trunk/man/de/ps2pdf.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: ps2pdf.1,v 1.4 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: ps2pdf.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH PS2PDF 1 "8.Juli 2002" 7.21 Ghostscript \" -*- nroff -*-
@@ -47,6 +47,6 @@
.SH VERSION
Dieses Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Diese Manpage ist von George Ferguson.
Modified: gs-common/trunk/man/de/ps2ps.1
==============================================================================
--- gs-common/trunk/man/de/ps2ps.1 (original)
+++ gs-common/trunk/man/de/ps2ps.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: ps2ps.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: ps2ps.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH PS2PS 1 "8.Juli 2002" 7.21 "Ghostscript-Werkzeuge" \" -*- nroff -*-
@@ -23,5 +23,5 @@
.SH VERSION
Dieses Document wurde zuletzt für Ghostscript Version 7.21 überarbeitet.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Modified: gs-common/trunk/man/de/wftopfa.1
==============================================================================
--- gs-common/trunk/man/de/wftopfa.1 (original)
+++ gs-common/trunk/man/de/wftopfa.1 Sun Oct 22 23:23:49 2006
@@ -1,4 +1,4 @@
-.\" $Id: wftopfa.1,v 1.3 2002/09/09 08:11:44 ghostgum Exp $
+.\" $Id: wftopfa.1 6300 2005-12-28 19:56:24Z giles $
.\" Using encoding of the German (de_DE) translation: ISO-8859-1
.\" Translation by Tobias Burnus <burnus at gmx.de> and Thomas Hoffmann
.TH WFTOPFA 1 "8.Juli 2002" 7.21 Ghostscript \" -*- nroff -*-
@@ -15,6 +15,6 @@
.SH VERSION
Das Dokument wurde zuletzt für Ghostscript Version 7.21 durchgesehen.
.SH AUTOR
-artofcode LLC und Artifex Software, bug-gs at ghostscript.com, sind die
+Artifex Software, Inc. und artofcode LLC sind die
Hauptautoren von Ghostscript.
Diese Manpage ist von George Ferguson.
Modified: gs-common/trunk/scripts/bdftops
==============================================================================
--- gs-common/trunk/scripts/bdftops (original)
+++ gs-common/trunk/scripts/bdftops Sun Oct 22 23:23:49 2006
@@ -1,8 +1,8 @@
#!/bin/sh
-# $Id: bdftops,v 1.4 2002/02/21 21:49:28 giles Exp $
-gs="`dirname $0`/gs"
-if test ! -x "$gs"; then
- gs=gs
-fi
+# $Id: bdftops 6300 2005-12-28 19:56:24Z giles $
-exec "$gs" -q -dBATCH -dNODISPLAY -- bdftops.ps "$@"
+# This definition is changed on install to match the
+# executable name set in the makefile
+GS_EXECUTABLE=gs
+
+exec $GS_EXECUTABLE -q -dBATCH -dNODISPLAY -- bdftops.ps "$@"
Added: gs-common/trunk/scripts/ps2ps2
==============================================================================
--- (empty file)
+++ gs-common/trunk/scripts/ps2ps2 Sun Oct 22 23:23:49 2006
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: ps2ps2 6300 2005-12-28 19:56:24Z giles $
+# "Distill" PostScript.
+
+# This definition is changed on install to match the
+# executable name set in the makefile
+GS_EXECUTABLE=gs
+
+OPTIONS="-dSAFER"
+while true
+do
+ case "$1" in
+ -*) OPTIONS="$OPTIONS $1" ;;
+ *) break ;;
+ esac
+ shift
+done
+
+if [ $# -ne 2 ]; then
+ echo "Usage: `basename $0` [options] input.ps output.ps" 1>&2
+ echo " e.g. `basename $0` -sPAPERSIZE=a4 input.ps output.ps" 1>&2
+ exit 1
+fi
+
+exec $GS_EXECUTABLE -q -sDEVICE=ps2write "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"
More information about the Pkg-gs-devel
mailing list