- FontType
FontMatrix
Encoding
FontBBox
PainType
Private
CharStrings
(1) %!PS-AdobeFont-1.0: HelveticaCyr
(2)
%%Title: HelveticaCyr
(3) %%BeginResource: font
HelveticaCyr
(4)
(5) /FullName (Helvetica Cyr)
def
(6) /FamilyName (Helvetica Cyr) def
(7)
/Weight (Medium) def
(8) /ItalicAngle 0 def
(9)
/FontName /HelveticaCyr def
(10) /ArialCyr findfont
dup length dict dup % font dict dict
(11) 3 -1 roll %
dict dict font
(12) { 1 index /FID ne 2 index
/UniqueID ne and
(13) { 2 index 3 1 roll put
}
(14) { pop pop } ifelse
(15) }
forall
(16)
(17) dup /FontName /HelveticaCyr
put
(18) /HelveticaCyr exch definefont
pop
(19)
(20) %%EndResource
(21)
%%EOF
/FullName (Arial Koi8) def /encoding_array 256 array def /ArialCyr findfont dup length dict dup dup /FontName /ArialKoi8 put %%EndResource%!PS-AdobeFont-1.0: ArialKoi8
%%Title:
ArialKoi8
%%CreationDate: Птн 28 Ноя 1997 21:26:14
EET
%%BeginResource: font ArialKoi8
/FamilyName (Arial
Koi8) def
/Weight (Regular) def
/ItalicAngle 0
def
/FontName /ArialKoi8 def
0 1 127 { dup
encoding_array exch dup StandardEncoding exch get put }
for
128 1 255 { encoding_array exch /.notdef put }
for
encoding_array
dup 163 /afii10071 put
%e
dup 179 /afii10023 put %-
dup 184 /afii61352
put %+
dup 192 /afii10096 put %ю
dup 193
/afii10065 put %а
dup 194 /afii10066 put %б
dup
195 /afii10088 put %ц
dup 196 /afii10069 put
%д
dup 197 /afii10070 put %е
dup 198 /afii10086
put %ф
dup 199 /afii10068 put %г
dup 200
/afii10087 put %х
dup 201 /afii10074 put %и
dup
202 /afii10075 put %й
dup 203 /afii10076 put
%к
dup 204 /afii10077 put %л
dup 205 /afii10078
put %м
dup 206 /afii10079 put %н
dup 207
/afii10080 put %о
dup 208 /afii10081 put %п
dup
209 /afii10097 put %я
dup 210 /afii10082 put
%р
dup 211 /afii10083 put %с
dup 212 /afii10084
put %т
dup 213 /afii10085 put %у
dup 214
/afii10072 put %ж
dup 215 /afii10067 put %в
dup
216 /afii10094 put %ь
dup 217 /afii10093 put
%ы
dup 218 /afii10073 put %з
dup 219 /afii10090
put %ш
dup 220 /afii10095 put %э
dup 221
/afii10091 put %щ
dup 222 /afii10089 put %ч
dup
223 /afii10092 put %ъ
dup 224 /afii10048 put
%Ю
dup 225 /afii10017 put %А
dup 226 /afii10018
put %Б
dup 227 /afii10040 put %Ц
dup 228
/afii10021 put %Д
dup 229 /afii10022 put %Е
dup
230 /afii10038 put %Ф
dup 231 /afii10020 put
%Г
dup 232 /afii10039 put %Х
dup 233 /afii10026
put %И
dup 234 /afii10027 put %Й
dup 235
/afii10028 put %К
dup 236 /afii10029 put %Л
dup
237 /afii10030 put %М
dup 238 /afii10031 put
%Н
dup 239 /afii10032 put %О
dup 240 /afii10033
put %П
dup 241 /afii10049 put %Я
dup 242
/afii10034 put %Р
dup 243 /afii10035 put %С
dup
244 /afii10036 put %Т
dup 245 /afii10037 put
%У
dup 246 /afii10024 put %Ж
dup 247 /afii10019
put %В
dup 248 /afii10046 put %Ь
dup 249
/afii10045 put %Ы
dup 250 /afii10025 put %З
dup
251 /afii10042 put %Ш
dup 252 /afii10047 put
%Э
dup 253 /afii10043 put %Щ
dup 254 /afii10041
put %Ч
dup 255 /afii10044 put %Ъ
pop
3 -1
roll
{ 1 index /FID ne 2 index /UniqueID ne 3 index
/Encodind ne and and
{ 2 index 3 1 roll put }
{
pop pop } ifelse
} forall
dup /Encoding
encoding_array put
/ArialKoi8 exch definefont pop
%%EOF
/=only { 256 string cvs print } bind def
%!
% written by James Clark
%
print an afm file on the standard output
% usage is
`fontname printafm' eg `/Times-Roman printafm'
% From the `dvitops' distribution, which included
this notice:
% dvitops is not copyrighted; you can do
with it exactly as you please.
% I would, however,
ask that if you make improvements or modifications,
%
you ask me before distributing them to others.
% Altered by d.love@dl.ac.uk to produce input for
Rokicki's afm2tfm,
% which groks the format of the
Adobe AFMs.
% Modified by L. Peter Deutsch 9/14/93:
% uses
Ghostscript's =only procedure to replace 'buf cvs
print'.
% Modified by L. Peter Deutsch 9/6/95:
%
uses Ghostscript's shellarguments facility to accept the
font name
% on the command line.
/onechar 1 string def
% c toupper - c
/toupper {
dup dup 8#141 ge
exch 8#172 le and {
8#40 sub
} if
} bind def
% printcharmetrics -
/printcharmetrics {
(StartCharMetrics )
print
currentfont /CharStrings get dup length exch
/.notdef known
{ 1 sub } if =
currentfont 1000
scalefont setfont 0 0 moveto
/e currentfont /Encoding
get def
0 1 255 {
dup e exch get
dup /.notdef
ne {
exch dup printmetric
} {
pop pop
}
ifelse
} for
% s contains an entry for each name
in the original encoding vector
/s 256 dict def
e
{
s exch true put
} forall
% v is the new
encoding vector
/v 256 array def
0 1 255 {
v
exch /.notdef put
} for
% fill up v with names in
CharStrings
/i 0 def
currentfont /CharStrings get
{
pop
i 255 le {
v i 3 -1 roll put
/i i 1
add def
} {
pop
} ifelse
} forall
%
define a new font with v as its encoding
vector
currentfont maxlength dict /f exch
def
currentfont {
exch dup dup /FID ne exch
/Encoding ne and {
exch f 3 1 roll put
} {
pop
pop
} ifelse
} forall
f /Encoding v put
f
/FontName /temp put
% make this new font the current
font
/temp f definefont setfont
% print a entry
for each character not in old vector
/e currentfont
/Encoding get def
0 1 255 {
dup e exch get
dup
dup /.notdef ne exch s exch known not and {
exch -1
printmetric
} {
pop pop
} ifelse
}
for
(EndCharMetrics) =
} bind def
% name actual_code normal_code printmetric -
/printmetric {
/saved save def
(C ) print
=only
( ; WX ) print
onechar 0 3 -1 roll
put
onechar stringwidth pop round cvi =only
( ; N
) print =only
( ; B ) print
onechar false charpath
flattenpath mark pathbbox counttomark {
counttomark
-1 roll
round cvi =only
( ) print
} repeat
pop
(;) =
saved restore
} bind def
% fontname printafm -
/printafm {
findfont gsave
setfont
(StartFontMetrics 2.0) =
(FontName ) print
currentfont /FontName get =
% Print the FontInfo
currentfont /FontInfo get {
exch
=string cvs
dup dup 0 get 0 exch toupper put print
( ) print
=
} forall
% Print the FontBBox
(FontBBox) print
currentfont /FontBBox get {
(
) print round cvi =only
} forall
(\n) print
printcharmetrics
(EndFontMetrics)
=
grestore
} bind def
% Check for command line arguments.
%[
shellarguments
% { ] dup length 1 eq
% { 0 get
printafm }
% { (Usage: printafm fontname\n) print
flush }
% ifelse
% }
% { pop }
%ifelse
/=only { 256 string cvs print } bind def
/ArialKoi8 printafm
quit
0
1
5
8
dectech
dingbats
fontspecific
symbol
Нельзя приписать созданному нами шрифту ArialCyrKoi8
шаблон имени вида
-roy
international-arial-*-*-*-*-*-*-*-*-*-*-koi8-r
т.к.
Encoding "r" не входит в список допустимых. Также нельзя
использовать шаблон
-roy
international-arial-*-*-*-*-*-*-*-*-*-*-koi8-1
т.к. в
Encoding "1" нет имeн типа afii10093. Однако можно
применить шаблон
-roy
international-arial-*-*-*-*-*-*-*-*-*-*-koi8-5
Dec 4 17:04:12 vit inetd[110]:
/usr/openwin/lib/fs.auto: Child Status Changed
- ArialCP1251
ArialCP1251-Bold
ArialCP1251-BoldItalic
ArialCP1251-Italic
ArialCP866
ArialCP866-Bold
ArialCP866-BoldItalic
ArialCP866-Italic
ArialKoi8
ArialKoi8-Bold
ArialKoi8-BoldItalic
ArialKoi8-Italic
CourierCP1251
CourierCP1251-Bold
CourierCP1251-BoldItalic
CourierCP1251-Italic
CourierCP866
CourierCP866-Bold
CourierCP866-BoldItalic
CourierCP866-Italic
CourierKoi8
CourierKoi8-Bold
CourierKoi8-BoldItalic
CourierKoi8-Italic
TimesNewRomanCP1251
TimesNewRomanCP1251-Bold
TimesNewRomanCP1251-BoldItalic
TimesNewRomanCP1251-Italic
TimesNewRomanCP866
TimesNewRomanCP866-Bold
TimesNewRomanCP866-BoldItalic
TimesNewRomanCP866-Italic
TimesNewRomanKoi8
TimesNewRomanKoi8-Bold
TimesNewRomanKoi8-BoldItalic
TimesNewRomanKoi8-Italic
/usr/openwin/demo/dpsexec
/usr/openwin/demo/fontadd
/usr/openwin/demo/fontadmin
/usr/openwin/demo/fontls
/usr/openwin/demo/fontrm
/usr/openwin/demo/fpadd
/usr/openwin/demo/fpls
/usr/openwin/demo/fprm
Base directory
[$OPENWINHOME/lib/locale/ru/X11]?
$ $OPENWINHOME/bin/xlsfonts | grep "roy
international"
-roy
international-arial-bold-i-normal--0-0-0-0-p-0-cp1251-5
-roy
international-arial-bold-i-normal--0-0-0-0-p-0-cp866-5
-roy
international-arial-bold-i-normal--0-0-0-0-p-0-koi8-5
-roy
international-arial-bold-r-normal--0-0-0-0-p-0-cp1251-5
-roy
international-arial-bold-r-normal--0-0-0-0-p-0-cp866-5
-roy
international-arial-bold-r-normal--0-0-0-0-p-0-koi8-5
-roy
international-arial-medium-i-normal--0-0-0-0-p-0-cp1251-5
-roy
international-arial-medium-i-normal--0-0-0-0-p-0-cp866-5
-roy
international-arial-medium-i-normal--0-0-0-0-p-0-koi8-5
-roy
international-arial-medium-r-normal--0-0-0-0-p-0-cp1251-5
-roy
international-arial-medium-r-normal--0-0-0-0-p-0-cp866-5
-roy
international-arial-medium-r-normal--0-0-0-0-p-0-koi8-5
-roy
international-courier-bold-i-normal--0-0-0-0-m-0-cp1251-5
-roy
international-courier-bold-i-normal--0-0-0-0-m-0-cp866-5
-roy
international-courier-bold-i-normal--0-0-0-0-m-0-koi8-5
-roy
international-courier-bold-r-normal--0-0-0-0-m-0-cp1251-5
-roy
international-courier-bold-r-normal--0-0-0-0-m-0-cp866-5
-roy
international-courier-bold-r-normal--0-0-0-0-m-0-koi8-5
-roy
international-courier-medium-i-normal--0-0-0-0-m-0-cp1251-5
-roy
international-courier-medium-i-normal--0-0-0-0-m-0-cp866-5
-roy
international-courier-medium-i-normal--0-0-0-0-m-0-koi8-5
-roy
international-courier-medium-r-normal--0-0-0-0-m-0-cp1251-5
-roy
international-courier-medium-r-normal--0-0-0-0-m-0-cp866-5
-roy
international-courier-medium-r-normal--0-0-0-0-m-0-koi8-5
-roy
international-times-bold-i-normal--0-0-0-0-p-0-cp1251-5
-roy
international-times-bold-i-normal--0-0-0-0-p-0-cp866-5
-roy
international-times-bold-i-normal--0-0-0-0-p-0-koi8-5
-roy
international-times-bold-r-normal--0-0-0-0-p-0-cp1251-5
-roy
international-times-bold-r-normal--0-0-0-0-p-0-cp866-5
-roy
international-times-bold-r-normal--0-0-0-0-p-0-koi8-5
-roy
international-times-medium-i-normal--0-0-0-0-p-0-cp1251-5
-roy
international-times-medium-i-normal--0-0-0-0-p-0-cp866-5
-roy
international-times-medium-i-normal--0-0-0-0-p-0-koi8-5
-roy
international-times-medium-r-normal--0-0-0-0-p-0-cp1251-5
-roy
international-times-medium-r-normal--0-0-0-0-p-0-cp866-5
-roy
international-times-medium-r-normal--0-0-0-0-p-0-koi8-5
$
$OPENWINHOME/bin/xfontsel
.% Example usages at bottom of file
/#copies 1 def /T6 /Times-Roman findfont 6 scalefont def % do single character of page % print code name, width and char name % print char with reference lines % print page title % print one block of characters % print a line of character % print font sample page % Display the first 128 encoded characters.
DoTitle (, characters 0-127) show % Display the second 128 encoded characters.
DoTitle (, characters 128-255) show F /FontType get 1 eq /Encoded F /Encoding get length dict def % Print the unencoded characters in blocks of 128.
0 128 Unencoded length 1 sub DoTitle (, unencoded characters) show showpage } } def
% Do font samples % Do a complete catalog%!
Запомните этот файл под именем prfont.ps,
замените пятую строчку снизу
%%Creator: Eric Gisin
%%Title: Print
font catalog
% Copyright (c) 1986 Eric Gisin
%
Copyright (C) 1992 Aladdin Enterprises, Menlo Park,
CA
(ghost@aladdin.com)
% Modified to print all 256
encoded characters.
% Copyright (C) 1993 Aladdin
Enterprises, Menlo Park, CA
(ghost@aladdin.com)
%
Modified to print unencoded characters.
% Copyright
(C) 1994 Aladdin Enterprises, Menlo Park,
CA
(ghost@aladdin.com)
% Modified to always create
256-element Encoding vectors.
% Copyright (C) 1995
Aladdin Enterprises, Menlo Park,
CA
(ghost@aladdin.com)
% Modified to print more
than 128 unencoded characters.
% Copyright (C) 1996
Aladdin Enterprises, Menlo Park,
CA
(ghost@aladdin.com)
% Modified to leave a
slightly wider left margin, because many H-P
%
printers can't print in the leftmost 1/4" of the page.
/min { 2 copy gt { exch } if pop }
bind def
/Temp 64
string def
/Inch {72 mul} def
/Base 16 def % char
code output base
/TempEncoding [ 256 { /.notdef }
repeat ] def
% output to
rectangle ll=(0,-24) ur=(36,24)
/DoChar {
/C exch
def
/S (_) dup 0 C put def
/N F /Encoding get C
get def
/W F
setfont S stringwidth pop def
T6 setfont
N
/.notdef ne {0 -20 moveto N Temp cvs show} if
0 -12
moveto C Base Temp cvrs show ( ) show
W 0.0005 add
Temp cvs 0 5 getinterval show
N /.notdef ne
{
3 0 translate
0 0 moveto F24 setfont N
glyphshow
/W S stringwidth pop def
0 -6 moveto 0
24 lineto
W -6 moveto W 24 lineto
-3 0 moveto W 3
add 0 lineto
0 setlinewidth stroke
} if
} def
/DoTitle {
/Times-Roman
findfont 18 scalefont setfont
36 10.5 Inch moveto
FName Temp cvs show ( ) show ((24 point)) show
} def
/DoBlock { %
firstcode lastcode
/FirstCode 2 index def
1 exch
{
/I exch def
/Xn I FirstCode sub 16 mod def /Yn I
FirstCode sub 16 idiv def
gsave
Xn 35 mul 24 add
Yn -56 mul 9.5 Inch add translate
I
DoChar
grestore
} for
} def
/DoLine { % firstcode
lastcode
1 exch { (_) dup 0 3 index put show pop }
for
} def
/DoFont {
/FName exch
def % font name
/F FName findfont def
/F24 F 24
scalefont def
/Line0 96 string def
/Line1 96
string def
0 127
DoBlock
F 10 scalefont setfont
36 2.0 Inch moveto
0 63 DoLine
36 1.5 Inch moveto 64 127
DoLine
showpage
128 255
DoBlock
F 10 scalefont setfont
36 2.0 Inch moveto
128 191 DoLine
36 1.5 Inch moveto 192 255
DoLine
showpage
{
% Find and display the
unencoded characters.
F
/Encoding get { true Encoded 3 1 roll put }
forall
/Unencoded [ F /CharStrings get
{ pop dup
Encoded exch known { pop } if }
forall ]
def
/Count Unencoded length def
{ dup 128 add
Unencoded length min 1 index sub
Unencoded 3 1 roll
getinterval TempEncoding copy
/BlockEncoding exch
def
/BlockCount BlockEncoding length def
save
F
length dict F
{ 1 index /FID eq { pop pop } { 2 index
3 1 roll put } ifelse }
forall dup /Encoding
TempEncoding put
/* exch definefont
/F exch
def
/F24 F 24 scalefont def
0 BlockCount
1 sub DoBlock
F 10 scalefont setfont
36 2.0 Inch
moveto 0 BlockCount 64 min 1 sub DoLine
BlockCount 64
gt
{ 36 1.5 Inch moveto 64 BlockCount 128 min 1 sub
DoLine
}
if
restore
} for
if
% /Times-Roman DoFont
% Test (less than a minute)
%
/Hershey-Gothic-English DoFont % Test
(8 minutes)
% FontDirectory {pop
DoFont} forall % All fonts (quite a
long time)
% /Times-Roman DoFont
% Test (less than a minute)
на
/ArialCyrKoi8 DoFont
% Test (less than a minute)
и откройте его в программе imagetool. Вы увидите
красивую таблицу, содержащую много полезной информации о
шрифте ArialKoi8. Проделайте эту операцию для ArialCP866
и ArialCP1251.
‹meta .... charset=....›
только тогда, когда
читает файл из cache!
Netscape 3.0, по-видимому,
выбирает шрифт для отображения страницы, считанной из
cache по следующему алгоритму:
1. Если в информации содержится предложение
‹meta
.... charset=....›
то Netscape 3.0 пытается выбрать
требуемый charset. В случае отсутствия этого charset на
Вашем компьютере, Netscape 3.0 выбирает
charset="iso-8859-1", устанавливая, при этом, совершенно
непонятный Encoding для второй половины таблицы символов
(для значений больше 128). В этом случае, Netscape 3.0
также не реагирует на любые попытки выбора Encoding из
меню Options->Document Encoding. Если требуемый
charset найден, а для Netscape 3.0 это может быть только
один из
нижеперечисленных:
iso-8859-1
iso-8859-2
iso-2022-jp
shift_jis
x-euc-jp
big5
x-euc-tw
gb2312
euc-kr
iso-2022-kr
koi8-r
iso-8859-5
iso-8859-7
iso-8859-9
то Netscape 3.0 ищет в файле ресурсов строчки,
устанавливающие соответствие между MIME именем charset
(например koi8-r) и значением двух последних полей в
шаблоне выбора шрифта:
-*-*-*-*-*-*-*-*-*-*-*-*-*-*
например, если файл ресурсов содержит
строчки
*documentFonts.charset*koi8-1:
koi8-r
*documentFonts.charset*koi8-r:
koi8-r
то при поиске шрифта будут выданы запросы со
следующими
шаблонами:
-*-*-*-*-*-*-*-*-*-*-*-*-koi8-1
-*-*-*-*-*-*-*-*-*-*-*-*-koi8-r
-*-arial-*-*-*-*-*-*-*-*-*-*-koi8-1
-*-arial-*-*-*-*-*-*-*-*-*-*-koi8-r
‹meta .... charset=....›
или был открыт локальный
файл, то Netscape 3.0 управляет выбором шрифта для
отображения только через меню Options->Document
Encoding. Рассмотрим далее, каким образом появляются
новые значения Encoding в меню Options->General
Preferences->fonts->For the Encoding: Это
выполняется через уже рассмотренные нами строчки в файле
ресурсов. Для работы с русскими шрифтами имеющимися в
Solaris 2.5.1, а также шрифтами, которые мы создали, в
файле ресурсов должны присутствовать следующие
строчки:
*documentFonts.charset*koi8-5:
koi8-r
*documentFonts.charset*iso8859-5:
iso-8859-5
*XmLGrid*fontList:\
-*-helvetica-medium-r-*-*-*-100-*-*-*-*-iso8859-*,\
-*-helvetica-bold-r-*-*-*-100-*-*-*-*-iso8859-*=BOLD,\
-*-helvetica-medium-o-*-*-*-100-*-*-*-*-iso8859-*=ITALIC
на*XmLGrid*fontList:\
-*-arial-medium-r-*-*-*-100-*-*-*-*-koi8-*,\
-*-arial-bold-r-*-*-*-100-*-*-*-*-koi8-*=BOLD,\
-*-arial-medium-i-*-*-*-100-*-*-*-*-koi8-*=ITALIC
*menuBar*fontList: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
на
*menuBar*fontList:
-*-arial-bold-r-*-*-*-120-*-*-*-*-koi8-*
*documentFonts.charset*koi8-5: koi8-r
*documentFonts.charset*iso8859-5: iso-8859-5
*Netscape*fontList: -*-*-medium-r-normal--*-140-*-*-*-*-koi8-*
*documentFonts.xResolution*iso-8859-1: 75
*documentFonts.yResolution*iso-8859-1: 75
-----------------------------------------------
По матеpиалам Roy International