trofftable.rc: make work
This commit is contained in:
parent
1b4758d596
commit
a0997f38c4
3 changed files with 1173 additions and 1164 deletions
|
@ -5,7 +5,8 @@
|
||||||
RESOLUTION=720
|
RESOLUTION=720
|
||||||
UNITWIDTH=10
|
UNITWIDTH=10
|
||||||
|
|
||||||
OCTALESCAPES=${OCTALESCAPES:-160} # <= code means add \0ddd names
|
if(~ $#OCTALESCAPES 0)
|
||||||
|
OCTALESCAPES=160 # <= code means add \0ddd names
|
||||||
DOWNLOADVECTOR=FALSE # TRUE can mean incomplete tables
|
DOWNLOADVECTOR=FALSE # TRUE can mean incomplete tables
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -16,9 +17,8 @@ DOWNLOADVECTOR=FALSE # TRUE can mean incomplete tables
|
||||||
# font.
|
# font.
|
||||||
#
|
#
|
||||||
|
|
||||||
BuiltinTables() {
|
fn BuiltinTables {
|
||||||
cat <<-'//End of BuiltinTables'
|
echo 'Proportional R Times-Roman
|
||||||
Proportional R Times-Roman
|
|
||||||
Proportional I Times-Italic
|
Proportional I Times-Italic
|
||||||
Proportional B Times-Bold
|
Proportional B Times-Bold
|
||||||
Proportional BI Times-BoldItalic
|
Proportional BI Times-BoldItalic
|
||||||
|
@ -57,15 +57,15 @@ BuiltinTables() {
|
||||||
Greek GR Symbol
|
Greek GR Symbol
|
||||||
Symbol S Symbol
|
Symbol S Symbol
|
||||||
Special S1 Times-Roman
|
Special S1 Times-Roman
|
||||||
Description DESC ---
|
Proportional CMR12 CMR12
|
||||||
//End of BuiltinTables
|
Description DESC ---'
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# AllTables prints the complete list of builtin font names.
|
# AllTables prints the complete list of builtin font names.
|
||||||
#
|
#
|
||||||
|
|
||||||
AllTables() {
|
fn AllTables {
|
||||||
BuiltinTables | awk '{print $2}'
|
BuiltinTables | awk '{print $2}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,16 +84,15 @@ AllTables() {
|
||||||
# flagged with the PostScript comment "% missing".
|
# flagged with the PostScript comment "% missing".
|
||||||
#
|
#
|
||||||
|
|
||||||
StandardCharset() {
|
fn StandardCharset {
|
||||||
cat <<-'//End of StandardCharset'
|
echo '(!) /exclam
|
||||||
(!) /exclam
|
|
||||||
(") /quotedbl
|
(") /quotedbl
|
||||||
(dq) (") % synonym
|
(dq) (") % synonym
|
||||||
(#) /numbersign
|
(#) /numbersign
|
||||||
($) /dollar
|
($) /dollar
|
||||||
(%) /percent
|
(%) /percent
|
||||||
(&) /ampersand
|
(&) /ampersand
|
||||||
(') /quoteright
|
('') /quoteright
|
||||||
(\() /parenleft
|
(\() /parenleft
|
||||||
(\)) /parenright
|
(\)) /parenright
|
||||||
(*) /asterisk
|
(*) /asterisk
|
||||||
|
@ -212,7 +211,7 @@ StandardCharset() {
|
||||||
(+-) /plusminus % missing
|
(+-) /plusminus % missing
|
||||||
(2^) /twosuperior % missing
|
(2^) /twosuperior % missing
|
||||||
(3^) /threesuperior % missing
|
(3^) /threesuperior % missing
|
||||||
(\\') /acute
|
(\\'') /acute
|
||||||
(aa) (") % devpost synonym
|
(aa) (") % devpost synonym
|
||||||
(/u) /mu % missing
|
(/u) /mu % missing
|
||||||
(P!) /paragraph
|
(P!) /paragraph
|
||||||
|
@ -228,7 +227,7 @@ StandardCharset() {
|
||||||
(34) /threequarters % missing
|
(34) /threequarters % missing
|
||||||
(??) /questiondown
|
(??) /questiondown
|
||||||
(A`) /Agrave
|
(A`) /Agrave
|
||||||
(A') /Aacute
|
(A'') /Aacute
|
||||||
(A^) /Acircumflex
|
(A^) /Acircumflex
|
||||||
(A~) /Atilde
|
(A~) /Atilde
|
||||||
(A") /Adieresis
|
(A") /Adieresis
|
||||||
|
@ -236,31 +235,31 @@ StandardCharset() {
|
||||||
(AE) /AE
|
(AE) /AE
|
||||||
(C,) /Ccedilla
|
(C,) /Ccedilla
|
||||||
(E`) /Egrave
|
(E`) /Egrave
|
||||||
(E') /Eacute
|
(E'') /Eacute
|
||||||
(E^) /Ecircumflex
|
(E^) /Ecircumflex
|
||||||
(E") /Edieresis
|
(E") /Edieresis
|
||||||
(I`) /Igrave
|
(I`) /Igrave
|
||||||
(I') /Iacute
|
(I'') /Iacute
|
||||||
(I^) /Icircumflex
|
(I^) /Icircumflex
|
||||||
(I") /Idieresis
|
(I") /Idieresis
|
||||||
(D-) /Eth % missing
|
(D-) /Eth % missing
|
||||||
(N~) /Ntilde
|
(N~) /Ntilde
|
||||||
(O`) /Ograve
|
(O`) /Ograve
|
||||||
(O') /Oacute
|
(O'') /Oacute
|
||||||
(O^) /Ocircumflex
|
(O^) /Ocircumflex
|
||||||
(O~) /Otilde
|
(O~) /Otilde
|
||||||
(O") /Odieresis
|
(O") /Odieresis
|
||||||
(xx) /multiply % missing
|
(xx) /multiply % missing
|
||||||
(O/) /Oslash
|
(O/) /Oslash
|
||||||
(U`) /Ugrave
|
(U`) /Ugrave
|
||||||
(U') /Uacute
|
(U'') /Uacute
|
||||||
(U^) /Ucircumflex
|
(U^) /Ucircumflex
|
||||||
(U") /Udieresis
|
(U") /Udieresis
|
||||||
(Y') /Yacute % missing
|
(Y'') /Yacute % missing
|
||||||
(TH) /Thorn % missing
|
(TH) /Thorn % missing
|
||||||
(ss) /germandbls
|
(ss) /germandbls
|
||||||
(a`) /agrave
|
(a`) /agrave
|
||||||
(a') /aacute
|
(a'') /aacute
|
||||||
(a^) /acircumflex
|
(a^) /acircumflex
|
||||||
(a~) /atilde
|
(a~) /atilde
|
||||||
(a") /adieresis
|
(a") /adieresis
|
||||||
|
@ -268,27 +267,27 @@ StandardCharset() {
|
||||||
(ae) /ae
|
(ae) /ae
|
||||||
(c,) /ccedilla
|
(c,) /ccedilla
|
||||||
(e`) /egrave
|
(e`) /egrave
|
||||||
(e') /eacute
|
(e'') /eacute
|
||||||
(e^) /ecircumflex
|
(e^) /ecircumflex
|
||||||
(e") /edieresis
|
(e") /edieresis
|
||||||
(i`) /igrave
|
(i`) /igrave
|
||||||
(i') /iacute
|
(i'') /iacute
|
||||||
(i^) /icircumflex
|
(i^) /icircumflex
|
||||||
(i") /idieresis
|
(i") /idieresis
|
||||||
(d-) /eth % missing
|
(d-) /eth % missing
|
||||||
(n~) /ntilde
|
(n~) /ntilde
|
||||||
(o`) /ograve
|
(o`) /ograve
|
||||||
(o') /oacute
|
(o'') /oacute
|
||||||
(o^) /ocircumflex
|
(o^) /ocircumflex
|
||||||
(o~) /otilde
|
(o~) /otilde
|
||||||
(o") /odieresis
|
(o") /odieresis
|
||||||
(-:) /divide % missing
|
(-:) /divide % missing
|
||||||
(o/) /oslash
|
(o/) /oslash
|
||||||
(u`) /ugrave
|
(u`) /ugrave
|
||||||
(u') /uacute
|
(u'') /uacute
|
||||||
(u^) /ucircumflex
|
(u^) /ucircumflex
|
||||||
(u") /udieresis
|
(u") /udieresis
|
||||||
(y') /yacute % missing
|
(y'') /yacute % missing
|
||||||
(th) /thorn % missing
|
(th) /thorn % missing
|
||||||
(y") /ydieresis
|
(y") /ydieresis
|
||||||
(^a) /circumflex % devpost accent
|
(^a) /circumflex % devpost accent
|
||||||
|
@ -298,23 +297,21 @@ StandardCharset() {
|
||||||
(oa) /ring % devpost accent
|
(oa) /ring % devpost accent
|
||||||
("a) /hungarumlaut % devpost accent
|
("a) /hungarumlaut % devpost accent
|
||||||
(Ca) /ogonek % devpost accent
|
(Ca) /ogonek % devpost accent
|
||||||
(va) /caron % devpost accent
|
(va) /caron % devpost accent'
|
||||||
//End of StandardCharset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# DingbatsCharset guarantees changes in StandardCharset don't show up in ZD.
|
# DingbatsCharset guarantees changes in StandardCharset don't show up in ZD.
|
||||||
#
|
#
|
||||||
|
|
||||||
DingbatsCharset() {
|
fn DingbatsCharset {
|
||||||
cat <<-'//End of DingbatsCharset'
|
echo '(!) /exclam
|
||||||
(!) /exclam
|
|
||||||
(") /quotedbl
|
(") /quotedbl
|
||||||
(#) /numbersign
|
(#) /numbersign
|
||||||
($) /dollar
|
($) /dollar
|
||||||
(%) /percent
|
(%) /percent
|
||||||
(&) /ampersand
|
(&) /ampersand
|
||||||
(') /quoteright
|
('') /quoteright
|
||||||
(\() /parenleft
|
(\() /parenleft
|
||||||
(\)) /parenright
|
(\)) /parenright
|
||||||
(*) /asterisk
|
(*) /asterisk
|
||||||
|
@ -422,7 +419,7 @@ DingbatsCharset() {
|
||||||
(+-) /plusminus % missing
|
(+-) /plusminus % missing
|
||||||
(2^) /twosuperior % missing
|
(2^) /twosuperior % missing
|
||||||
(3^) /threesuperior % missing
|
(3^) /threesuperior % missing
|
||||||
(\\') /acute
|
(\\'') /acute
|
||||||
(/u) /mu % missing
|
(/u) /mu % missing
|
||||||
(P!) /paragraph
|
(P!) /paragraph
|
||||||
(.^) /periodcentered
|
(.^) /periodcentered
|
||||||
|
@ -435,7 +432,7 @@ DingbatsCharset() {
|
||||||
(34) /threequarters % missing
|
(34) /threequarters % missing
|
||||||
(??) /questiondown
|
(??) /questiondown
|
||||||
(A`) /Agrave
|
(A`) /Agrave
|
||||||
(A') /Aacute
|
(A'') /Aacute
|
||||||
(A^) /Acircumflex
|
(A^) /Acircumflex
|
||||||
(A~) /Atilde
|
(A~) /Atilde
|
||||||
(A") /Adieresis
|
(A") /Adieresis
|
||||||
|
@ -443,31 +440,31 @@ DingbatsCharset() {
|
||||||
(AE) /AE
|
(AE) /AE
|
||||||
(C,) /Ccedilla
|
(C,) /Ccedilla
|
||||||
(E`) /Egrave
|
(E`) /Egrave
|
||||||
(E') /Eacute
|
(E'') /Eacute
|
||||||
(E^) /Ecircumflex
|
(E^) /Ecircumflex
|
||||||
(E") /Edieresis
|
(E") /Edieresis
|
||||||
(I`) /Igrave
|
(I`) /Igrave
|
||||||
(I') /Iacute
|
(I'') /Iacute
|
||||||
(I^) /Icircumflex
|
(I^) /Icircumflex
|
||||||
(I") /Idieresis
|
(I") /Idieresis
|
||||||
(D-) /Eth % missing
|
(D-) /Eth % missing
|
||||||
(N~) /Ntilde
|
(N~) /Ntilde
|
||||||
(O`) /Ograve
|
(O`) /Ograve
|
||||||
(O') /Oacute
|
(O'') /Oacute
|
||||||
(O^) /Ocircumflex
|
(O^) /Ocircumflex
|
||||||
(O~) /Otilde
|
(O~) /Otilde
|
||||||
(O") /Odieresis
|
(O") /Odieresis
|
||||||
(xx) /multiply % missing
|
(xx) /multiply % missing
|
||||||
(O/) /Oslash
|
(O/) /Oslash
|
||||||
(U`) /Ugrave
|
(U`) /Ugrave
|
||||||
(U') /Uacute
|
(U'') /Uacute
|
||||||
(U^) /Ucircumflex
|
(U^) /Ucircumflex
|
||||||
(U") /Udieresis
|
(U") /Udieresis
|
||||||
(Y') /Yacute % missing
|
(Y'') /Yacute % missing
|
||||||
(TH) /Thorn % missing
|
(TH) /Thorn % missing
|
||||||
(ss) /germandbls
|
(ss) /germandbls
|
||||||
(a`) /agrave
|
(a`) /agrave
|
||||||
(a') /aacute
|
(a'') /aacute
|
||||||
(a^) /acircumflex
|
(a^) /acircumflex
|
||||||
(a~) /atilde
|
(a~) /atilde
|
||||||
(a") /adieresis
|
(a") /adieresis
|
||||||
|
@ -475,35 +472,33 @@ DingbatsCharset() {
|
||||||
(ae) /ae
|
(ae) /ae
|
||||||
(c,) /ccedilla
|
(c,) /ccedilla
|
||||||
(e`) /egrave
|
(e`) /egrave
|
||||||
(e') /eacute
|
(e'') /eacute
|
||||||
(e^) /ecircumflex
|
(e^) /ecircumflex
|
||||||
(e") /edieresis
|
(e") /edieresis
|
||||||
(i`) /igrave
|
(i`) /igrave
|
||||||
(i') /iacute
|
(i'') /iacute
|
||||||
(i^) /icircumflex
|
(i^) /icircumflex
|
||||||
(i") /idieresis
|
(i") /idieresis
|
||||||
(d-) /eth % missing
|
(d-) /eth % missing
|
||||||
(n~) /ntilde
|
(n~) /ntilde
|
||||||
(o`) /ograve
|
(o`) /ograve
|
||||||
(o') /oacute
|
(o'') /oacute
|
||||||
(o^) /ocircumflex
|
(o^) /ocircumflex
|
||||||
(o~) /otilde
|
(o~) /otilde
|
||||||
(o") /odieresis
|
(o") /odieresis
|
||||||
(-:) /divide % missing
|
(-:) /divide % missing
|
||||||
(o/) /oslash
|
(o/) /oslash
|
||||||
(u`) /ugrave
|
(u`) /ugrave
|
||||||
(u') /uacute
|
(u'') /uacute
|
||||||
(u^) /ucircumflex
|
(u^) /ucircumflex
|
||||||
(u") /udieresis
|
(u") /udieresis
|
||||||
(y') /yacute % missing
|
(y'') /yacute % missing
|
||||||
(th) /thorn % missing
|
(th) /thorn % missing
|
||||||
(y") /ydieresis
|
(y") /ydieresis'
|
||||||
//End of DingbatsCharset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SymbolCharset() {
|
fn SymbolCharset {
|
||||||
cat <<-'//End of SymbolCharset'
|
echo '(---) /exclam
|
||||||
(---) /exclam
|
|
||||||
(fa) /universal
|
(fa) /universal
|
||||||
(---) /numbersign
|
(---) /numbersign
|
||||||
(te) /existential
|
(te) /existential
|
||||||
|
@ -745,14 +740,12 @@ SymbolCharset() {
|
||||||
(rt) /bracerighttp
|
(rt) /bracerighttp
|
||||||
(rk) /bracerightmid
|
(rk) /bracerightmid
|
||||||
(rb) /bracerightbt
|
(rb) /bracerightbt
|
||||||
(~=) (55 0 1) % charlib
|
(~=) (55 0 1) % charlib'
|
||||||
//End of SymbolCharset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SpecialCharset() {
|
fn SpecialCharset {
|
||||||
cat <<-'//End of SpecialCharset'
|
echo '(ru) /underscore
|
||||||
(ru) /underscore
|
('''') /quotedblright % devpost character
|
||||||
('') /quotedblright % devpost character
|
|
||||||
(``) /quotedblleft % devpost character
|
(``) /quotedblleft % devpost character
|
||||||
(dg) /dagger % devpost character
|
(dg) /dagger % devpost character
|
||||||
(dd) /daggerdbl % devpost character
|
(dd) /daggerdbl % devpost character
|
||||||
|
@ -779,8 +772,7 @@ SpecialCharset() {
|
||||||
(lH) (100 0 1) % charlib
|
(lH) (100 0 1) % charlib
|
||||||
(rH) (100 0 1) % charlib
|
(rH) (100 0 1) % charlib
|
||||||
(PC) (220 2 1) % charlib
|
(PC) (220 2 1) % charlib
|
||||||
(DG) (185 2 1) % charlib
|
(DG) (185 2 1) % charlib'
|
||||||
//End of SpecialCharset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -791,10 +783,9 @@ SpecialCharset() {
|
||||||
# set appeared sometime after Version 50.0.
|
# set appeared sometime after Version 50.0.
|
||||||
#
|
#
|
||||||
|
|
||||||
Latin1() {
|
fn Latin1 {
|
||||||
if [ "$DOWNLOADVECTOR" = TRUE ]; then
|
if(~ $"DOWNLOADVECTOR TRUE){
|
||||||
cat <<-'//End of ISOLatin1Encoding'
|
echo ' /ISOLatin1Encoding [
|
||||||
/ISOLatin1Encoding [
|
|
||||||
/.notdef
|
/.notdef
|
||||||
/.notdef
|
/.notdef
|
||||||
/.notdef
|
/.notdef
|
||||||
|
@ -1051,11 +1042,10 @@ Latin1() {
|
||||||
/yacute
|
/yacute
|
||||||
/thorn
|
/thorn
|
||||||
/ydieresis
|
/ydieresis
|
||||||
] def
|
] def'
|
||||||
//End of ISOLatin1Encoding
|
}
|
||||||
fi
|
|
||||||
|
|
||||||
echo "ISOLatin1Encoding /$1 ReEncode"
|
echo 'ISOLatin1Encoding /'^$1^' ReEncode'
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1066,11 +1056,11 @@ Latin1() {
|
||||||
# all available.
|
# all available.
|
||||||
#
|
#
|
||||||
|
|
||||||
Proportional() {
|
fn Proportional {
|
||||||
echo "/unitwidth $UNITWIDTH def"
|
echo /unitwidth $UNITWIDTH def
|
||||||
echo "/resolution $RESOLUTION def"
|
echo /resolution $RESOLUTION def
|
||||||
echo "/octalescapes $OCTALESCAPES def"
|
echo /octalescapes $OCTALESCAPES def
|
||||||
echo "/charset ["
|
echo '/charset ['
|
||||||
# Get <>_ and | from S. Use accents for ascii ^ and ~.
|
# Get <>_ and | from S. Use accents for ascii ^ and ~.
|
||||||
StandardCharset | awk '
|
StandardCharset | awk '
|
||||||
$1 == "(<)" && $2 == "/less" {$1 = "(---)"}
|
$1 == "(<)" && $2 == "/less" {$1 = "(---)"}
|
||||||
|
@ -1087,118 +1077,118 @@ Proportional() {
|
||||||
}
|
}
|
||||||
{printf "%s\t%s\n", $1, $2}
|
{printf "%s\t%s\n", $1, $2}
|
||||||
'
|
'
|
||||||
echo "] def"
|
echo '] def'
|
||||||
|
|
||||||
Latin1 $2
|
Latin1 $2
|
||||||
echo "/$2 SelectFont"
|
echo /$2 SelectFont
|
||||||
echo "(opO) SetAscender"
|
echo '(opO) SetAscender'
|
||||||
|
|
||||||
echo "(name $1\\\\n) Print"
|
echo '(name '^$1^'\n) Print'
|
||||||
echo "(fontname $2\\\\n) Print"
|
echo '(fontname '^$2^'\n) Print'
|
||||||
echo "/$1 NamedInPrologue"
|
echo /$1 NamedInPrologue
|
||||||
echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"
|
echo '(spacewidth ) Print 32 GetWidth Print (\n) Print'
|
||||||
echo "(charset\\\\n) Print"
|
echo '(charset\n) Print'
|
||||||
echo "BuildFontCharset"
|
echo BuildFontCharset
|
||||||
}
|
}
|
||||||
|
|
||||||
FixedWidth() {
|
fn FixedWidth {
|
||||||
echo "/unitwidth $UNITWIDTH def"
|
echo '/unitwidth $UNITWIDTH def'
|
||||||
echo "/resolution $RESOLUTION def"
|
echo '/resolution $RESOLUTION def'
|
||||||
echo "/octalescapes $OCTALESCAPES def"
|
echo '/octalescapes $OCTALESCAPES def'
|
||||||
echo "/charset ["
|
echo '/charset ['
|
||||||
StandardCharset
|
StandardCharset
|
||||||
echo "] def"
|
echo '] def'
|
||||||
|
|
||||||
Latin1 $2
|
Latin1 $2
|
||||||
echo "/$2 SelectFont"
|
echo /$2 SelectFont
|
||||||
echo "(opO) SetAscender"
|
echo '(opO) SetAscender'
|
||||||
|
|
||||||
echo "(name $1\\\\n) Print"
|
echo '(name '^$1^'\n) Print'
|
||||||
echo "(fontname $2\\\\n) Print"
|
echo '(fontname '^$2^'\n) Print'
|
||||||
echo "/$1 NamedInPrologue"
|
echo /$1 NamedInPrologue
|
||||||
echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"
|
echo '(spacewidth ) Print 32 GetWidth Print (\n) Print'
|
||||||
echo "(charset\\\\n) Print"
|
echo '(charset\n) Print'
|
||||||
echo "BuildFontCharset"
|
echo BuildFontCharset
|
||||||
}
|
}
|
||||||
|
|
||||||
Dingbats() {
|
fn Dingbats {
|
||||||
echo "/unitwidth $UNITWIDTH def"
|
echo '/unitwidth $UNITWIDTH def'
|
||||||
echo "/resolution $RESOLUTION def"
|
echo '/resolution $RESOLUTION def'
|
||||||
echo "/octalescapes $OCTALESCAPES def"
|
echo '/octalescapes $OCTALESCAPES def'
|
||||||
echo "/charset ["
|
echo '/charset ['
|
||||||
DingbatsCharset | awk '$1 != "(---)" && $2 ~ /^\/[a-zA-Z]/ {
|
DingbatsCharset | awk '$1 != "(---)" && $2 ~ /^\/[a-zA-Z]/ {
|
||||||
printf "%s\tISOLatin1Encoding %s GetCode\n", $1, $2
|
printf "%s\tISOLatin1Encoding %s GetCode\n", $1, $2
|
||||||
}'
|
}'
|
||||||
echo "] def"
|
echo '] def'
|
||||||
|
|
||||||
echo "/$2 SelectFont"
|
echo /$2 SelectFont
|
||||||
echo "( ) SetAscender"
|
echo '( ) SetAscender'
|
||||||
|
|
||||||
echo "(name $1\\\\n) Print"
|
echo '(name '^$1^'\n) Print'
|
||||||
echo "(fontname $2\\\\n) Print"
|
echo '(fontname '^$2^'\n) Print'
|
||||||
echo "/$1 NamedInPrologue"
|
echo /$1 NamedInPrologue
|
||||||
echo "(charset\\\\n) Print"
|
echo '(charset\n) Print'
|
||||||
echo "BuildFontCharset"
|
echo BuildFontCharset
|
||||||
}
|
}
|
||||||
|
|
||||||
Greek() {
|
fn Greek {
|
||||||
echo "/unitwidth $UNITWIDTH def"
|
echo /unitwidth $UNITWIDTH def
|
||||||
echo "/resolution $RESOLUTION def"
|
echo /resolution $RESOLUTION def
|
||||||
echo "/charset ["
|
echo /charset [
|
||||||
SymbolCharset | awk '
|
SymbolCharset | awk '
|
||||||
BEGIN {hit = -1}
|
BEGIN {hit = -1}
|
||||||
$1 ~ /\(\*[a-zA-Z]\)/ {print; hit = NR}
|
$1 ~ /\(\*[a-zA-Z]\)/ {print; hit = NR}
|
||||||
$2 == "(\")" && hit == NR-1 {print; hit = NR}
|
$2 == "(\")" && hit == NR-1 {print; hit = NR}
|
||||||
'
|
'
|
||||||
echo "] def"
|
echo ] def
|
||||||
|
|
||||||
echo "/$2 SelectFont"
|
echo /$2 SelectFont
|
||||||
echo "(orO) SetAscender"
|
echo '(orO) SetAscender'
|
||||||
|
|
||||||
echo "(name $1\\\\n) Print"
|
echo '(name '^$1^'\n) Print'
|
||||||
echo "(fontname $2\\\\n) Print"
|
echo '(fontname '^$2^'\n) Print'
|
||||||
echo "/$1 NamedInPrologue"
|
echo /$1 NamedInPrologue
|
||||||
echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"
|
echo '(spacewidth ) Print 32 GetWidth Print (\n) Print'
|
||||||
echo "(charset\\\\n) Print"
|
echo '(charset\n) Print'
|
||||||
echo "BuildFontCharset"
|
echo BuildFontCharset
|
||||||
}
|
}
|
||||||
|
|
||||||
Symbol() {
|
fn Symbol {
|
||||||
echo "/unitwidth $UNITWIDTH def"
|
echo /unitwidth $UNITWIDTH def
|
||||||
echo "/resolution $RESOLUTION def"
|
echo /resolution $RESOLUTION def
|
||||||
echo "/charset ["
|
echo /charset [
|
||||||
SymbolCharset
|
SymbolCharset
|
||||||
echo "] def"
|
echo ] def
|
||||||
|
|
||||||
echo "ChangeMetrics"
|
echo ChangeMetrics
|
||||||
echo "/S SelectFont"
|
echo /S SelectFont
|
||||||
echo "(orO) SetAscender"
|
echo '(orO) SetAscender'
|
||||||
|
|
||||||
echo "(name $1\\\\n) Print"
|
echo '(name '^$1^'\n) Print'
|
||||||
echo "(fontname $2\\\\n) Print"
|
echo '(fontname '^$2^'\n) Print'
|
||||||
echo "/$1 NamedInPrologue"
|
echo /$1 NamedInPrologue
|
||||||
echo "(special\\\\n) Print"
|
echo '(special\n) Print'
|
||||||
echo "(charset\\\\n) Print"
|
echo '(charset\n) Print'
|
||||||
echo "BuildFontCharset"
|
echo BuildFontCharset
|
||||||
}
|
}
|
||||||
|
|
||||||
Special() {
|
fn Special {
|
||||||
echo "/unitwidth $UNITWIDTH def"
|
echo /unitwidth $UNITWIDTH def
|
||||||
echo "/resolution $RESOLUTION def"
|
echo /resolution $RESOLUTION def
|
||||||
echo "/charset ["
|
echo /charset [
|
||||||
SpecialCharset
|
SpecialCharset
|
||||||
echo "] def"
|
echo ] def
|
||||||
|
|
||||||
echo "ChangeMetrics"
|
echo ChangeMetrics
|
||||||
echo "/S1 SelectFont"
|
echo /S1 SelectFont
|
||||||
|
|
||||||
echo "(# Times-Roman special font\\\\n) Print"
|
echo '(# Times-Roman special font\n) Print'
|
||||||
echo "(name $1\\\\n) Print"
|
echo '(name '^$1^'\n) Print'
|
||||||
echo "(fontname $2\\\\n) Print"
|
echo '(fontname '^$2^'\n) Print'
|
||||||
echo "/$1 NamedInPrologue"
|
echo /$1 NamedInPrologue
|
||||||
echo "(special\\\\n) Print"
|
echo '(special\n) Print'
|
||||||
echo "(charset\\\\n) Print"
|
echo '(charset\n) Print'
|
||||||
echo "BuildFontCharset"
|
echo BuildFontCharset
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1206,15 +1196,14 @@ Special() {
|
||||||
# consistency.
|
# consistency.
|
||||||
#
|
#
|
||||||
|
|
||||||
Description() {
|
fn Description {
|
||||||
echo "/charset [" # awk - so the stack doesn't overflow
|
echo /charset [ # awk - so the stack doesn't overflow
|
||||||
StandardCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'
|
StandardCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'
|
||||||
SymbolCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'
|
SymbolCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'
|
||||||
SpecialCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'
|
SpecialCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'
|
||||||
echo "] def"
|
echo ] def
|
||||||
|
|
||||||
cat <<-//DESC
|
echo '(#Device Description - utf character set
|
||||||
(#Device Description - utf character set
|
|
||||||
|
|
||||||
PDL PostScript
|
PDL PostScript
|
||||||
Encoding Latin1
|
Encoding Latin1
|
||||||
|
@ -1229,10 +1218,9 @@ Description() {
|
||||||
vert 1
|
vert 1
|
||||||
unitwidth $UNITWIDTH
|
unitwidth $UNITWIDTH
|
||||||
|
|
||||||
) Print
|
) Print'
|
||||||
//DESC
|
echo '(charset\n) Print'
|
||||||
echo "(charset\\\\n) Print"
|
echo BuildDescCharset
|
||||||
echo "BuildDescCharset"
|
echo '(\n) Print'
|
||||||
echo "(\\\\n) Print"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,46 +1,63 @@
|
||||||
.ds dF /usr/lib/font
|
.ds dF /sys/lib/troff/font
|
||||||
.ds dQ /usr/lib/postscript
|
.ds dQ /sys/lib/postscript/prologues
|
||||||
.TH TROFFTABLE 1 "DWB 3.2"
|
.TH TROFFTABLE 1
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.B trofftable
|
trofftable \- output a PostScript program that builds a font width table
|
||||||
\- output a PostScript program that builds a font width table
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\*(mBtrofftable\f1
|
|
||||||
.OP "" options []
|
|
||||||
.OP "" shortname
|
|
||||||
.OP "" longname []
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B trofftable
|
.B trofftable
|
||||||
|
[
|
||||||
|
.B -t
|
||||||
|
.I name
|
||||||
|
] [
|
||||||
|
.B -C
|
||||||
|
.I file
|
||||||
|
] [
|
||||||
|
.B -H
|
||||||
|
.I hostdir
|
||||||
|
] [
|
||||||
|
.B -L
|
||||||
|
.I file
|
||||||
|
] [
|
||||||
|
.B -S
|
||||||
|
.I file
|
||||||
|
] [
|
||||||
|
.B -T
|
||||||
|
.I name
|
||||||
|
]
|
||||||
|
.I shortname
|
||||||
|
[
|
||||||
|
.I longname
|
||||||
|
]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.I Trofftable
|
||||||
writes a PostScript program on the standard output that builds a
|
writes a PostScript program on the standard output that builds a
|
||||||
font width table or typesetter description file.
|
font width table or typesetter description file.
|
||||||
The following
|
The following options are understood:
|
||||||
.I options
|
.TP
|
||||||
are understood:
|
.BI -t " name"
|
||||||
.TP 1.0i
|
|
||||||
.OP \-t name
|
|
||||||
Use
|
Use
|
||||||
.I name
|
.I name
|
||||||
as the template for fonts not in the default set.
|
as the template for fonts not in the default set.
|
||||||
Choose
|
Choose
|
||||||
.MW R
|
.B R
|
||||||
for proportionally spaced fonts and
|
for proportionally spaced fonts and
|
||||||
.MW CW
|
.B CW
|
||||||
for fixed width fonts.
|
for fixed width fonts.
|
||||||
Try
|
Try
|
||||||
.MW ZD
|
.B ZD
|
||||||
(ZapfDingbats) if the font has a non-standard
|
(ZapfDingbats) if the font has a non-standard
|
||||||
character set.
|
character set.
|
||||||
The default is
|
The default is
|
||||||
.MR R .
|
.BR R .
|
||||||
.TP 1.0i
|
.TP
|
||||||
.OP \-C file
|
.BI -C " file"
|
||||||
Copy
|
Copy
|
||||||
.I file
|
.I file
|
||||||
into each PostScript table program;
|
into each PostScript table program;
|
||||||
.I file
|
.I file
|
||||||
must contain legitimate PostScript.
|
must contain legitimate PostScript.
|
||||||
.TP 1.0i
|
.TP
|
||||||
.OP \-H hostdir
|
.BI -H " hostdir"
|
||||||
Use
|
Use
|
||||||
.I hostdir
|
.I hostdir
|
||||||
as the host resident font directory.
|
as the host resident font directory.
|
||||||
|
@ -50,55 +67,55 @@ that matches the name of the troff font is assumed to be a host
|
||||||
resident font program and is included in the PostScript width
|
resident font program and is included in the PostScript width
|
||||||
table program.
|
table program.
|
||||||
There is no default.
|
There is no default.
|
||||||
.TP 1.0i
|
.TP
|
||||||
.OP \-L file
|
.BI -L " file"
|
||||||
Use
|
Use
|
||||||
.I file
|
.I file
|
||||||
as the PostScript prologue.
|
as the PostScript prologue.
|
||||||
.br
|
.br
|
||||||
The default is
|
The default is
|
||||||
.MW \*(dQ/trofftable.ps
|
.B \*(dQ/trofftable.ps
|
||||||
.TP 1.0i
|
.TP
|
||||||
.OP \-S file
|
.BI -S " file"
|
||||||
Use
|
Use
|
||||||
.I file
|
.I file
|
||||||
as the shell library file.
|
as the shell library file.
|
||||||
Overrides the choice made with the
|
Overrides the choice made with the
|
||||||
.OP \-T
|
.B -T
|
||||||
option.
|
option.
|
||||||
.TP 1.0i
|
.TP
|
||||||
.OP \-T name
|
.BI -T " name"
|
||||||
Set the target device to
|
Set the target device to
|
||||||
.IR name .
|
.IR name .
|
||||||
Device
|
Device
|
||||||
.I name
|
.I name
|
||||||
means
|
means
|
||||||
.br
|
.br
|
||||||
.MI \*(dF/dev name /shell.lib
|
.BI \*(dF/dev name /shell.lib
|
||||||
is the shell library file.
|
is the shell library file.
|
||||||
There is no default.
|
There is no default.
|
||||||
.PP
|
.PP
|
||||||
One of
|
One of
|
||||||
.OP \-T
|
.B -T
|
||||||
or
|
or
|
||||||
.OP \-S
|
.B -S
|
||||||
is required.
|
is required.
|
||||||
If both are given
|
If both are given
|
||||||
.OP \-S
|
.B -S
|
||||||
wins.
|
wins.
|
||||||
Either
|
Either
|
||||||
.OP \-H
|
.B -H
|
||||||
or
|
or
|
||||||
.OP \-C
|
.B -C
|
||||||
can be used to include a host resident font.
|
can be used to include a host resident font.
|
||||||
.PP
|
.PP
|
||||||
The shell library file defines a collection of functions used to
|
The shell library file defines a collection of functions used to
|
||||||
build troff tables.
|
build troff tables.
|
||||||
The default set of tables is the list of names returned by the
|
The default set of tables is the list of names returned by the
|
||||||
.MW AllTables
|
.B AllTables
|
||||||
function.
|
function.
|
||||||
Changes to the default list can be made by updating the
|
Changes to the default list can be made by updating the
|
||||||
.MW BuiltinTables
|
.B BuiltinTables
|
||||||
function.
|
function.
|
||||||
.PP
|
.PP
|
||||||
.I Shortname
|
.I Shortname
|
||||||
|
@ -112,16 +129,16 @@ can be omitted only if
|
||||||
.I shortname
|
.I shortname
|
||||||
is a default table name.
|
is a default table name.
|
||||||
PostScript table programs created by
|
PostScript table programs created by
|
||||||
.B trofftable
|
.I trofftable
|
||||||
return data to the host computer using PostScript's
|
return data to the host computer using PostScript's
|
||||||
.MW print
|
.B print
|
||||||
operator.
|
operator.
|
||||||
See
|
See
|
||||||
.BR hardcopy (1)
|
.IR hardcopy (1)
|
||||||
if you don't have access to the printer's serial port.
|
if you don't have access to the printer's serial port.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
Get the PostScript program that builds a width table for font
|
Get the PostScript program that builds a width table for font
|
||||||
.MR R :
|
.BR R :
|
||||||
.EX
|
.EX
|
||||||
trofftable -Tpost R >R.ps
|
trofftable -Tpost R >R.ps
|
||||||
.EE
|
.EE
|
||||||
|
@ -133,32 +150,32 @@ trofftable -TLatin1 GL Garamond-Light >GL.ps
|
||||||
.EE
|
.EE
|
||||||
A font must be available on the printer when the table is built.
|
A font must be available on the printer when the table is built.
|
||||||
Use
|
Use
|
||||||
.OP \-H
|
.B -H
|
||||||
or
|
or
|
||||||
.OP \-C
|
.B -C
|
||||||
to include host resident fonts.
|
to include host resident fonts.
|
||||||
.SH WARNINGS
|
.SH WARNINGS
|
||||||
A width table will not build properly if the printer cannot access
|
A width table will not build properly if the printer cannot access
|
||||||
the PostScript font.
|
the PostScript font.
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.OP -TLatin1
|
.B -TLatin1
|
||||||
option only works on PostScript printers that support the full
|
option only works on PostScript printers that support the full
|
||||||
.SM ISO
|
.SM ISO
|
||||||
Latin-1 character set.
|
Latin-1 character set.
|
||||||
The error message from older printers will likely indicate a missing
|
The error message from older printers will likely indicate a missing
|
||||||
.MW ISOLatin1Encoding
|
.B ISOLatin1Encoding
|
||||||
array.
|
array.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.MW \*(dF/dev*/shell.lib
|
.B \*(dF/dev*/shell.lib
|
||||||
.br
|
.br
|
||||||
.MW \*(dQ/dpost.ps
|
.B \*(dQ/dpost.ps
|
||||||
.br
|
.br
|
||||||
.MW \*(dQ/trofftable.ps
|
.B \*(dQ/trofftable.ps
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR dpost (1),
|
.IR dpost (1),
|
||||||
.BR hardcopy (1),
|
.IR hardcopy (1),
|
||||||
.BR postio (1),
|
.IR postio (1),
|
||||||
.BR troff (1),
|
.IR troff (1),
|
||||||
.BR buildtables (1),
|
.IR buildtables (1),
|
||||||
.BR font (5)
|
.IR font (5)
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
# serial port. Try hardcopy if you don't have access to the port.
|
# serial port. Try hardcopy if you don't have access to the port.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
rfork e
|
||||||
|
|
||||||
POSTLIB=/sys/lib/postscript/prologues
|
POSTLIB=/sys/lib/postscript/prologues
|
||||||
FONTDIR=/sys/lib/troff/font
|
FONTDIR=/sys/lib/troff/font
|
||||||
|
|
||||||
|
@ -15,7 +17,7 @@ COPYFILE=()
|
||||||
HOSTFONTDIR=()
|
HOSTFONTDIR=()
|
||||||
DEVICE=()
|
DEVICE=()
|
||||||
LIBRARY=()
|
LIBRARY=()
|
||||||
TEMPLATE=-R
|
TEMPLATE=R
|
||||||
|
|
||||||
SLOWDOWN=25
|
SLOWDOWN=25
|
||||||
STARTCOMMENTS=256
|
STARTCOMMENTS=256
|
||||||
|
@ -28,8 +30,8 @@ TRAILER='%%Trailer'
|
||||||
|
|
||||||
while (! ~ $#* 0 && ~ $1 -*) {
|
while (! ~ $#* 0 && ~ $1 -*) {
|
||||||
switch ($1) {
|
switch ($1) {
|
||||||
case -C; shift; COPYFILE=$COPYFILE' '$1
|
case -C; shift; COPYFILE=($COPYFILE $1)
|
||||||
case -C*; COPYFILE=$COPYFILE' '`{echo $1 | sed s/-C//}
|
case -C*; COPYFILE=($COPYFILE `{echo $1 | sed s/-C//})
|
||||||
|
|
||||||
case -F; shift; FONTDIR=$1
|
case -F; shift; FONTDIR=$1
|
||||||
case -F*; FONTDIR=`{echo $1 | sed s/-F//}
|
case -F*; FONTDIR=`{echo $1 | sed s/-F//}
|
||||||
|
@ -63,7 +65,7 @@ while (! ~ $#* 0 && ~ $1 -*) {
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! ~ $#DEVICE 0 && ! ~ $#LIBRARY 0) {
|
if (~ $#DEVICE 0 && ~ $#LIBRARY 0) {
|
||||||
echo $0: no device or shell library >[1=2]
|
echo $0: no device or shell library >[1=2]
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -73,28 +75,31 @@ if (! ~ $#* 1 2) {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test -d $HOSTFONTDIR -a -f $HOSTFONTDIR/$1) {
|
if (! ~ $#HOSTFONTDIR 0 && test -d $HOSTFONTDIR -a -f $HOSTFONTDIR/$1) {
|
||||||
COPYFILE=$COPYFILE' '$HOSTFONTDIR/$1
|
COPYFILE=($COPYFILE $HOSTFONTDIR/$1)
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Include the shell library and get the command used to build the table.
|
# Include the shell library and get the command used to build the table.
|
||||||
# Make awk call a separate library function??
|
# Make awk call a separate library function??
|
||||||
#
|
#
|
||||||
if (~ $#LIBRARY 0 || ~ $LIBRARY '') LIBRARY=$FONTDIR/dev$DEVICE/shell.lib
|
if (~ $#LIBRARY 0) LIBRARY=$FONTDIR/dev$DEVICE/shell.lib
|
||||||
|
|
||||||
. $LIBRARY
|
. $LIBRARY
|
||||||
|
|
||||||
if (~ $#* 1) TEMPLATE=$1
|
if (~ $#* 1) TEMPLATE=$1
|
||||||
|
|
||||||
|
if (~ $#* 2) pname=$2
|
||||||
|
if not pname=''
|
||||||
|
|
||||||
CMD=`{BuiltinTables | awk '$2 == template"" {
|
CMD=`{BuiltinTables | awk '$2 == template"" {
|
||||||
if ( pname == "" )
|
if ( pname == "" )
|
||||||
pname = $3
|
pname = $3
|
||||||
printf "%s %s %s", $1, tname, pname
|
printf "%s %s %s", $1, tname, pname
|
||||||
exit 0
|
exit 0
|
||||||
}' template=$TEMPLATE tname=$1 pname=$2}
|
}' 'template='$TEMPLATE 'tname='$1 'pname='$pname}
|
||||||
|
|
||||||
if (! $CMD) {
|
if (~ $#CMD 0) {
|
||||||
echo $0: $TEMPLATE not found >[1=2]
|
echo $0: $TEMPLATE not found >[1=2]
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -111,7 +116,7 @@ echo end def
|
||||||
echo $ENDPROLOG
|
echo $ENDPROLOG
|
||||||
|
|
||||||
echo $BEGINSETUP
|
echo $BEGINSETUP
|
||||||
if (~ $COPYFILE '') COPYFILE=/dev/null
|
if (! ~ $#COPYFILE 0)
|
||||||
cat $COPYFILE
|
cat $COPYFILE
|
||||||
echo /slowdown $SLOWDOWN def
|
echo /slowdown $SLOWDOWN def
|
||||||
echo /startcomments $STARTCOMMENTS def
|
echo /startcomments $STARTCOMMENTS def
|
||||||
|
@ -120,4 +125,3 @@ echo $ENDSETUP
|
||||||
$CMD
|
$CMD
|
||||||
|
|
||||||
echo $TRAILER
|
echo $TRAILER
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue