[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog ./NEWS src/utils/afmtodit/afm...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog ./NEWS src/utils/afmtodit/afm... |
Date: |
Mon, 01 May 2006 08:37:13 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 06/05/01 08:37:13
Modified files:
. : ChangeLog NEWS
src/utils/afmtodit: afmtodit.man afmtodit.pl
Log message:
* src/utils/afmtodit/afmtodit.pl: New option `-c' to add font
information as a comment in output.
* src/utils/afmtodit/afmtodit.man, NEWS: Document it.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/groff/ChangeLog.diff?tr1=1.952&tr2=1.953&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/NEWS.diff?tr1=1.214&tr2=1.215&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/utils/afmtodit/afmtodit.man.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/utils/afmtodit/afmtodit.pl.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.952 groff/ChangeLog:1.953
--- groff/ChangeLog:1.952 Wed Apr 26 08:16:51 2006
+++ groff/ChangeLog Mon May 1 08:37:13 2006
@@ -1,3 +1,9 @@
+2006-04-30 Michail Vidiassov <address@hidden>
+
+ * src/utils/afmtodit/afmtodit.pl: New option `-c' to add font
+ information as a comment in output.
+ * src/utils/afmtodit/afmtodit.man, NEWS: Document it.
+
2006-04-26 Werner LEMBERG <address@hidden>
* src/devices/grohtml/post-html.cpp (html_printer::~html_printer):
Index: groff/NEWS
diff -u groff/NEWS:1.214 groff/NEWS:1.215
--- groff/NEWS:1.214 Tue Apr 4 20:20:03 2006
+++ groff/NEWS Mon May 1 08:37:13 2006
@@ -41,6 +41,12 @@
of x, this is, it rounds towards zero and not towards the next integer
less than or equal to x.
+Afmtodit
+--------
+
+o New option `-c' to output more font information as comments.
+
+
Macro Packages
--------------
Index: groff/src/utils/afmtodit/afmtodit.man
diff -u groff/src/utils/afmtodit/afmtodit.man:1.15
groff/src/utils/afmtodit/afmtodit.man:1.16
--- groff/src/utils/afmtodit/afmtodit.man:1.15 Sat Dec 3 08:15:11 2005
+++ groff/src/utils/afmtodit/afmtodit.man Mon May 1 08:37:13 2006
@@ -1,5 +1,6 @@
.ig
-Copyright (C) 1989-2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+Copyright (C) 1989-2000, 2001, 2002, 2003, 2005, 2006
+ Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -45,7 +46,7 @@
.in +\w'\fBafmtodit 'u
.ti \niu
.B afmtodit
-.OP \-mnsvx
+.OP \-cmnsvx
.OP \-a n
.OP \-d desc_file
.OP \-e enc_file
@@ -200,6 +201,10 @@
option to give the font a smaller slant.
.
.TP
+.B \-c
+Include comments in the font file in order to identify the PS font.
+.
+.TP
.BI \-d desc_file
The device description file is
.I desc_file
Index: groff/src/utils/afmtodit/afmtodit.pl
diff -u groff/src/utils/afmtodit/afmtodit.pl:1.18
groff/src/utils/afmtodit/afmtodit.pl:1.19
--- groff/src/utils/afmtodit/afmtodit.pl:1.18 Fri Dec 9 18:12:30 2005
+++ groff/src/utils/afmtodit/afmtodit.pl Mon May 1 08:37:13 2006
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
# -*- Perl -*-
-# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Written by James Clark (address@hidden)
#
@@ -30,9 +30,10 @@
my $groff_sys_fontdir = "@FONTDIR@";
use Getopt::Std;
-getopts('a:d:e:i:mnsvx');
+getopts('a:cd:e:i:mnsvx');
-our ($opt_a, $opt_d, $opt_e, $opt_i, $opt_m, $opt_n, $opt_s, $opt_v, $opt_x);
+our ($opt_a, $opt_c, $opt_d, $opt_e, $opt_i,
+ $opt_m, $opt_n, $opt_s, $opt_v, $opt_x);
if ($opt_v) {
print "GNU afmtodit (groff) version @address@hidden";
@@ -40,7 +41,7 @@
}
if ($#ARGV != 2) {
- die "usage: $prog [-mnsvx] [-a angle] [-d DESC] [-e encoding]\n" .
+ die "usage: $prog [-cmnsvx] [-a angle] [-d DESC] [-e encoding]\n" .
" [-i n] afmfile mapfile font\n";
}
@@ -54,6 +55,7 @@
# read the afm file
my $psname;
+my ($notice, $version, $fullname, $familyname, @comments);
my $italic_angle = 0;
my (@kern1, @kern2, @kernx);
my (%italic_correction, %left_italic_correction);
@@ -67,12 +69,28 @@
open(AFM, $afm) || die "$prog: can't open \`$ARGV[0]': $!\n";
while (<AFM>) {
- chop;
+ chomp;
+ s/\x0D$//;
my @field = split(' ');
next if $#field < 0;
if ($field[0] eq "FontName") {
$psname = $field[1];
}
+ elsif($field[0] eq "Notice") {
+ $notice = $_;
+ }
+ elsif($field[0] eq "Version") {
+ $version = $_;
+ }
+ elsif($field[0] eq "FullName") {
+ $fullname = $_;
+ }
+ elsif($field[0] eq "FamilyName") {
+ $familyname = $_;
+ }
+ elsif($field[0] eq "Comment") {
+ push(@comments, $_);
+ }
elsif($field[0] eq "ItalicAngle") {
$italic_angle = -$field[1];
}
@@ -286,7 +304,8 @@
# computation of a character sequence. It can be used by font
# designers to indicate some characteristics of the glyph. The
# suffix may contain periods or any other permitted characters.
- # Small cap A, for example, could be named `uni0041.sc' or `A.sc'.
+ # Small cap A, for example, could be named `uni0041.sc' or
+ # `A.sc'.
next if $ch =~ /\./;
@@ -409,6 +428,16 @@
print("encoding $e\n");
}
+if ($opt_c) {
+ print("# $fullname\n") if defined $fullname;
+ print("# $version\n") if defined $version;
+ print("# $familyname\n") if defined $familyname;
+ print("# $notice\n") if defined $notice;
+ foreach my $comment (@comments) {
+ print("# $comment\n");
+ }
+}
+
if (!$opt_n && %ligatures) {
print("ligatures");
while (my $lig = each %ligatures) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog ./NEWS src/utils/afmtodit/afm...,
Werner LEMBERG <=