c# open pdf file in adobe reader : Delete pages pdf document control Library utility azure .net windows visual studio tlgc2extra3-part1462

21.2 Typography:combiningcharactersforoptimalreadability
x
y
50
100
150
200
250
300
350
400
50
100
150
200
250
300
350
400
450
500
550
600
650
700
¡A long very softish presentation!
¡A long very softish presentation!
¡A long very softish presentation!
¡A long very softish presentation!
Figure21.5:Puttingboundingboxesonaline
x
y
50
100
150
200
50
100
150
200
250
300
350
400
450
500
550
600
650
700
f and i characters
f-i ligature
f and l characters f-l ligature
Figure21.6:Twocommonligatures
shorttextline,togetherwiththeboundingboxesandreferencepointsoftheindividualcharacters.Note
inparticularhowtheboundingboxesinthe“”combinationfortheitalicvariantoverlap.
is brings us naturallyto the notionofligature. In high-qualitytypography, a ligature occurs
wheretwoormoreletterformsarewrittenorprintedasaunit.Generally,ligaturesreplacetwoormore
characters that occur next to each other with a single glyph. Oen such characters share common
components.¹
Oneofthemost commonligaturesis“fi,”wherethedot abovealowercase“i”interfereswiththe
looponthelowercase“f”.erefore,thetwo-lettercombination“fi”isreplacedbyasingleentitywith
thedotabsorbedintothe”f”(seelepartofFigure21.6.)Herearethreelinesfromthe
.afm
filethat
havetodowiththe“f”character.
C 102 ; WX 333 ; N f
; B 14 0 389 691 ; L i fi ; L l fl ;
C 174 ; WX 556 ; N fi ; B 14 0 536 691 ;
C 175 ; WX 556 ; N fl ; B 14 0 536 691 ;
¹Ligaturesareasubsetofso-calledcontextualforms,wheretheparticularrenderingofalettercombinationdependsupon
itscontext,suchassurroundinglettersorwhetherornotitappearsattheendofaline,asinArabic.
ch-psextra1.tex,v:2.24
2007/08/14
21
Delete pages pdf document - remove PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provides Users with Mature Document Manipulating Function for Deleting PDF Pages
cut pages from pdf file; copy pages from pdf to new pdf
Delete pages pdf document - VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Visual Basic Sample Codes to Delete PDF Document Page in .NET
delete pages from pdf online; delete pdf pages acrobat
21
POSTSCRIPTFONTSANDBEYOND
x
y
50
100
150
200
250
300
350
400
450
50
100
150
200
250
300
350
400
450
500
550
600
650
700
A character
V character
A and V characters with kerning
negative kerning
positive kerning
Figure21.7:emechanicsofkerning
efirstlinestates(
L
keyword)thata“f”followsbya“i”shouldbereplacedbythecharacterwithname
fi
”(line2)whilea“f”followedbya“l”shouldbereplacedbythecharacterwithname“
fl
”(line3).
elatterligatureisseenattherightofFigure21.6onthepreviouspage.
efontfamilyTimesRomancontainsonlythe“fi”and“fl”ligatures,butseveralfontsoffermany
more(e.g.,thefontMinionProasdisplayedinTable21.6containsligaturesfor“”,“ff”,“”,“”,“ffi,”,
“,”,etc.).
ethird part ofan
.afm
fileconsistsofkerninginformation.Kerningistheprocessofadjusting
letterspacinginaproportionalfont,sothatthelevelofgreyalongalineof text isashomogeneously
distributedaspossible.Kerningvaluescanbepositive(increasespacebetweencharacterpairs)orneg-
ative(decreasespace).
InPostScriptkerningislimitedtopairsofindividualcharacters,whereaswithOpenTypethekern-
ingalgorithmisgeneralizedtotheofusekerningclasses,whereoneoffsetisstoredforanypairofchar-
actersfromtwosets,forexample(V,W)and(a,e,o).euseofkerningclassesismadenecessarybythe
factthatmowadaysfontscomeoenwith severalthousandsof glyphsformanylanguagessothatthe
numberofkerningpairstobespecified,especiallyforaccentedletters,wouldbecomeunmanageable.
Let us extract the kerning informationfor the characters in Figure21.7from the
.afm
file of
Times-Bold.
StartKernData
StartKernPairs 496
...
KPX A V
-145
KPX F period
-110
KPX f quoteright
55
...
EndKernPairs
EndKernData
elettersinFigure21.7aredrawnat250pt,sothat thekerningfiguresaboveshouldbemultiplied
22
ch-psextra1.tex,v:2.24
2007/08/14
C# PDF Page Insert Library: insert pages into PDF file in C#.net
how to merge PDF document files by C# code, how to rotate PDF document page, how to delete PDF page using C# .NET, how to reorganize PDF document pages and how
add and remove pages from a pdf; cut pages out of pdf file
C# PDF File & Page Process Library SDK for C#.net, ASP.NET, MVC
Page Process. File: Merge, Append PDF Files. File: Split PDF Document. File: Compress PDF. Page: Create Thumbnails. Page: Insert PDF Pages. Page: Delete Existing
delete blank pages in pdf files; delete pages pdf document
21.2 Typography:combiningcharactersforoptimalreadability
by250/1000totranslatethemtogridcoordinates.Letusstartwiththebottomline,typicalofcapital
letterswithobliquestems. Inthiscasewearetoldtomovethe“A”and “V”characterstogether byan
amount of−145units (i.e., on our grid the “V”is kerned36.25 pt to the le.) Oenpunctuation
followingcapitalshasalso to bekerned,asshowninthe first part of thetoplineinthefigure,where
the“period”is kerned110unitsnegatively(the periodmoves27.5pt lebelow the arm ofthe “F”,
asshownbythearrow).Ontheotherhand, quotesinterferewiththeupper finalpartsof letterswith
ascenders,asherewiththe“f”.uswemovethequoteouttowardstherightbyapositivekernof55
units(i.e.,13.75ptasshownbythelittlearrowpointingrightinourfigure).
efourth and last part of the
.afm
file contains information about composite characters and
showshowtheyaretobeconstructed;forexample,
Aacute
isnot acharacterinitsownright,butis
formedbyjoininganAandanacuteaccent.
StartComposites 58
CC Aacute
2 ; PCC A 0 0 ; PCC acute
188 210 ;
CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 188 210 ;
CC Adieresis
2 ; PCC A 0 0 ; PCC dieresis
188 210 ;
CC Agrave
2 ; PCC A 0 0 ; PCC grave
188 210 ;
....
EndComposites
EndFontMetrics
e third and fourth partsof an
.afm
file areoptional; a math symbol font would simplyhave the
generalinformationandtheindividualcharactermetrics.
21.2.1.2 eT
E
Xfontmetrics(
.tfm
)
emetricinformationthatT
E
Xneedsabout characters ofa fontisstored infileswiththeextension
.tfm
(for T
E
Xfont metric).Foreach characterinafont four dimensionsarerecorded: itswidth,its
heightaboveanditsdepthbelowthebaseline,andits“italiccorrection”,i.e.,theamountofextraspace
thatisaddedwiththe
\/
commandtotakeintoaccountaswitchfromaslantedtoanuprighttypeface.¹
isinformationissimilartothewidthandboundingboxinformationpresentinan
.afm
file.
e
.tfm
formatalsocontainsdataaboutrelationshipsbetweencharacters,suchaskerningsand
ligatures. Finally, againas inan
.afm
file, the
.tfm
formatincludes informationabout thefontasa
whole:anumberofdimensionsdenotingthefontdesignsize,thewidthofanormalspace,itsstretch-
ability, and soon. FromwithinT
E
Xtheyare accessibleviathe
\fontdimen
command[15,p. 428].
Fontsformathematicshaveextradimensionsforspecializedtypesetting.
Forreasonsofefficiencytheinformationinthe
.tfm
fileisstoredinbinaryformat.efilecan
bemadehuman-readablewiththehelpoftheprogram
tftopl
,whichproducesa
.pl
(propertylist)file
thatcanbemodified,ifnecessary.Conversely,the
pltotf
programtransformsa
.pl
fileintoa
.tfm
file.
21.2.2 T
E
Xvirtualfonts
Virtualfonts[10]arelikefontmetricfilesinthattheycontaingeneralinformationaboutthefontand
detailedinstructionsforeachcharacter.Buttheystandatahigherlevel:theydescribean“imaginary”
fontthatcanconsistofbitsofotherfonts,low-level
.dvi
codesuchasline-drawing,oreven
\special
commands.uscharacter47maysay“setacapitalTfromTimesRoman”,character53maysay“set
a20point=signfromComputerModern”,andcharacter101maysay“usea
\special
commandto
includethis logopicture”. Virtualfonts are used topretend toT
E
Xthat another font is arrangedlike
¹LAT
E
Xtakesautomaticallycareofthis byadding\/commands intherightplacesinitshigh-levelcommands,suchas
\textitand\emph.
ch-psextra1.tex,v:2.24
2007/08/14
23
C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net
Create the new document with 3 pages. String outputFilePath = Program.RootPath + "\\" Output.pdf"; newDoc.Save(outputFilePath);
add and delete pages from pdf; delete blank pages in pdf online
VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
Able to add and insert one or multiple pages to existing adobe PDF document in VB.NET. Add and Insert Multiple PDF Pages to PDF Document Using VB.
delete pages of pdf; copy pages from pdf into new pdf
21
POSTSCRIPTFONTSANDBEYOND
aComputerModernfont,toallow allT
E
X’sinternalmacrostoworkwithoutproblem,or tocombine
specializedcharactersfroman“expert”fontwithanormaltextfont.
Avirtualfonthastwoparts:a
.tfm
metricfilethatT
E
Xreads,anda
.vf
filethatdriversreadand
thattellsthemhowtocreateeach character. Mostoen,
.vf
filesareusedsimplytorearrangeafont
(i.e., “to createcharacter 212inthisfont,takecharacter176fromtheotherfont”),butitcanalso be
usedtocombinetwofonts,joinarbitrarycharacters,orevenchangecolor,rotatecharactersorperform
otheroperations.
Justlike
.tfm
files,virtualfontshaveahuman-readableform—the
.vpl
file.Conversionbetween
.vf
and
.vpl
formatishandledbytheprograms
vftovp
and
vptovf
.
Inadditiontopropertyentriesthatareallowedin
.pl
files,a
.vpl
filecancontainpropertytypes
thatdealwithselectingcharactersfromoneormorefonts(forwhich
.tfm
or
.vf
filesmustexist;se-
lectingcharactersrecursivelyisallowed).Forinstance,
VTITLE
identifiesthevirtualfont(defaultvalue
isanemptystring),the
MAPFONT
property,declares thefontsfrom whichcharacterscanbeselected,
andthe
MAP
property,whichcanappearaspartofa
CHARACTER
property,specifieswherethecharac-
tershouldbetakenfrom.elasttwopropertiestakeasvaluespropertylistswith propertiesrelevant
onlyfor
.vf
files.LetuslookatthevirtualfontforTimesRomanconstructedtosimulatesmallcapitals
(byscalingdownthebasefontby80% ). ebase font
ptmr8r.tfm
(T
E
XBase1encoding)has been
reencodedtothe
T1
encoding(
ptmr8t.tfm
)andthenscaleddowntosmallcapitals
ptmrc8t.tfm
and
ptmrc8t.vf
(seeSection21.7foranexplanationofthisfontnamingconvention).Letuscreatea
human-readable
.vpl
file:
> vftovp ptmrc8t.vf ptmrc8t.tfm ptmrc8t.vpl
eoutputfile
ptmrc8t.vpl
startsasfollows.
(VTITLE )
(FAMILY UNSPECIFIED)
(FACE F MRR)
(CODINGSCHEME EXTENDED TEX FONT ENCODING - LATIN)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 27461762233)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.25)
\emph{... several lines deleted}
)
(MAPFONT D 0
(FONTNAME ptmr8r)
(FONTCHECKSUM O 4767720433)
(FONTAT R 0.8)
(FONTDSIZE R 10.0)
)
(MAPFONT D 1
(FONTNAME ptmr8r)
(FONTCHECKSUM O 4767720433)
(FONTAT R 1.0)
(FONTDSIZE R 10.0)
)
Inside a
MAPFONT
property, the
FONTNAME
refers to the relevant
.tfm
file;
FONTCHECKSUM
should
match the checksum inthat font so that theprocessingsoware cantell if the right filewas found.
24
ch-psextra1.tex,v:2.24
2007/08/14
VB.NET PDF Page Extract Library: copy, paste, cut PDF pages in vb.
' Create the new document with 3 pages. Dim outputFilePath As String = Program.RootPath + "\\" Output.pdf" newDoc.Save(outputFilePath).
delete page from pdf preview; delete page pdf
C# Word - Delete Word Document Page in C#.NET
Delete Consecutive Pages from Word in C#. How to delete a range of pages from a Word document. How to delete several defined pages from a Word document.
delete pages of pdf online; delete pages pdf files
21.2 Typography:combiningcharactersforoptimalreadability
FONTDSIZE
shouldmatchthedesignsizeofthefont(10ptinthiscase)and
FONTAT
specifiesascaling
factor(0.8forfont“0”,whichimplementsartifialsmallcaps).
Asimpleentry(hereforthelowercaseletter“e”)givesthewidthandheightthenpickstheupper-
case“e”fromthescaled(default)fonttoconstructthesmallcapital.
(CHARACTER C e
(CHARWD R 0.537988)
(CHARHT R 0.514496)
(MAP
(MOVERIGHT R 0.025)
(SETCHAR C E)
(MOVERIGHT R 0.025)
)
)
AmoreinterestingexampleistheGerman“ß”, whichshouldbeturnedintotwosmallcapital“S”
characters.Inthe
T1
encodingthe“ß”characterhasoctalvalue
377
(seeTable21.15inAppendix21.8)
andthat is replacedbyasuccessionof two(scaled down) “S”charactersfromfont “0”.Ontheother
handtheuppercase“SS”(octalcode
337
,thesecondentrybelow)isanunscaled(
SELECTFONT 1
for
font“1”)combinationoftwouppercase“S”characters,asexpected.
(CHARACTER O 377
(CHARWD R 0.937988)
(CHARHT R 0.536994)
(CHARDP R 0.008991)
(MAP
(MOVERIGHT R 0.025)
(SETCHAR C S)
(SETCHAR C S)
(MOVERIGHT R 0.025)
)
)
(CHARACTER O 337
(CHARWD R 1.212)
(CHARHT R 0.672992)
(CHARDP R 0.008991)
(MAP
(MOVERIGHT R 0.025)
(SELECTFONT D 1)
(SETCHAR C S)
(MOVERIGHT R 0.05)
(SETCHAR C S)
(MOVERIGHT R 0.025)
)
)
Inprincipleanythingthatisvalidina
dvi
filecanbeusedinavirtualfont,forinstance
\special
commands, that canincluderawPostScriptcode. Note, however,thatsuchcodeis ingeneralhighly
nonportable,sinceitdependsonhowitisinterpretedbythe
dvi
driver.
Virtualfontscomethusinveryhandyforfontmanipulationpurposes,wherenewmetricsinfor-
mationissimplycalculated fromthat of abase fontto obtainstretched,shrunken, letter-spaced and
simulated smallcaps(see above)variants. Ingeneral, themanipulated metrics mustbe accompanied
bysomePostScriptcodetochangethefont glyphsthemselves.In
dvips
thiscanbedonewithcodein
ch-psextra1.tex,v:2.24
2007/08/14
25
C# PDF metadata Library: add, remove, update PDF metadata in C#.
C#.NET PDF SDK - Edit PDF Document Metadata in C#.NET. Allow C# Developers to Read, Add, Edit, Update and Delete PDF Metadata in .NET Project.
delete a page from a pdf acrobat; delete page pdf acrobat reader
C# PowerPoint - Delete PowerPoint Document Page in C#.NET
C#. How to delete a range of pages from a PowerPoint document. C#. How to delete several defined pages from a PowerPoint document.
delete pdf pages in preview; delete pages from a pdf reader
21
POSTSCRIPTFONTSANDBEYOND
themapfile,asfollows(seeSection22.2.5).
ptmr8r
Times-Roman
”TeXBase1Encoding ReEncodeFont” <8r.enc <timr.pfb
ptmr8rn Times-Roman ”.82 ExtendFont TeXBase1Encoding ReEncodeFont” <8r.enc <timr.pfb
ptmro8r Times-Roman ”.167 SlantFont TeXBase1Encoding ReEncodeFont” <8r.enc <timr.pfb
e first line specifies that the (virtual) font
ptmr8r
is obtained by re-encoding the original to
TeXBase1Encoding
(seeSection21.2.3). Two resources aresupplied, the definitionof theencod-
ing(
8r.enc
),and thePostScriptType1fontitself(
timr.pfb
).esecondlineprecedestheabove
operationwithananamorphicalshrinkingof thefontto 85% of its naturalwidth(
ptmr8rn
), while
thethird line generatesa obliquevariant (
ptmro8r
)byslantingthe original uprightfont. emet-
ric file that T
E
Xoriginallyread for thesetransformed files were created by takingthe normal met-
rics for
Times-Roman
and writinga virtualfont with the transformed values. e transformations
ExtendFont
,
ReEncodeFont
and
SlantFont
aredefinedinPostScript,inthestandardheaderfiles
downloaded by
dvips
.ese operationsareperformed by
dvips
onthe PostScript Type 1fonts aer
readingthemapfilewhilegeneratingthePostScriptfile(Chapter22givesmoredetailsonhow
dvips
works).
21.2.3 T
E
Xfontencodings
T
E
Xitself doesnotusecharacternames but absolutenumericcodes. Hence, arequest fortypesetting
acharacter is translated into arequest totypeset a character at aspecificposition ina certainfont.
Moreover, whenwewant toconstruct acharacter usingamacro, such as
\’{c}
,wewantthe effect
tobeć.ereforeT
E
Xhastoknow wheretofindthisinafont, anontrivialtaskifthepositionofthe
characterscanchangefromonefonttoanother.erearebasicallyfivekindsoffontlayouts(threefor
T
E
X-relatedandtwoforPostScript-relatedfonts):
1. thelayout of Knuth’s originalComputer Modernfonts, which infact consist of severalslightly
differentlayouts,sometimesdifferinginonlyonecharacter;
2. the“Cork”extendedT
E
Xlayout(
T1
encoding)(Figure21.8onthefacingpage)plusitssisteren-
codings
T2
T7
[15,p.416];
3. oneoftheextendedASCIIlayouts,asusedinWindowsorMacintoshapplications;
4. theAdobestandardlayout(thedefaultencodingofPostScriptfonts);
5. are-encodedPostScriptlayout,suchas“TeXBase1”describedbelow(Figure21.9onpage28).
is meansthat thedefinitionofmacros like
\’
must depend onthefont beingreferencedor,alter-
natively,allfontsmust useexactlythesamefontencodingtoavoidabsolutechaos.LAT
E
Ximplements
such commands as “encoding-specific”and provides aninterfaceforspecifyingdifferent definitions
that is activatedwhenthefont encodingchanges.isevenallows thedefinitionofacommandlike
\’
inoneencodingtoproduceacharactercompositionout ofanaccentandabasecharacter,andin
anotherencodingtoselectasinglecharacter(SeeTable7.33of[15]forexamples).
21.2.3.1 T
E
X’sTeXBase1encoding
Font names in the
PSNFSS
packages (see Section21.3.1) are based on theFontnamescheme (Sec-
tion21.7)and reflect theencodingused (e.g., the
T1
-encoded fontforTimesRomanis
ptmr8t
.)On
theotherhand the
.map
filessuppliedwith
PSNFSS
(for
dvips
)donotusethesenamesbutrefertoan
intermediate“raw”form,whichforTimesRomanis
ptmr8r
.Infact,eachfontisre-encodedtoanew
26
ch-psextra1.tex,v:2.24
2007/08/14
21.2 Typography:combiningcharactersforoptimalreadability
Test of ptmr8tonApril 13, 2006at2119
0
1
2
3
4
5
6
7
00x
·
¤
 
}0x
01x
02x
«
»
}1x
03x
ff
f
f
04x
!
"
#
$
%
&
}2x
05x
(
)
*
+
,
-
.
/
06x
0
1
2
3
4
5
6
7
}3x
07x
8
9
:
;
<
=
>
?
10x
@
A
B
C
D
E
F
G
}4x
11x
H
I
J
K
L
M
N
O
12x
P
Q
R
S
T
U
V
W
}5x
13x
X
Y
Z
[
\
]
^
_
14x
a
b
c
d
e
f
g
}6x
15x
h
i
j
k
l
m
n
o
16x
p
q
r
s
t
u
v
w
}7x
17x
x
y
z
{
|
}
~
-
20x
A
A
·
C
C
D
E
E
G
}8x
21x
·
L
L’
·
N
N
O
·
R
22x
R
·
S
‚S
T
‚T
U
 
U
}9x
23x
·
Z
Z
IJ
I
fld
§
24x
a
a
·c
c
d’
e
e
g
}Ax
25x
·
l
l’
·
n
n
o
·
r
26x
r
·s
‚s
t’
‚t
u
 u
}Bx
27x
ÿ
·z
z
ij
¡
¿
£
30x
À
`
´
ˆ
˜
¯
˘
˙
}Cx
31x
¨
É
˚
¸
Ì
˝
˛
ˇ
32x
Ñ
Ò
Ó
Ô
Õ
Ö
}Dx
33x
Ø
Ù
Ú
Û
Ü
Ý
Þ
SS
34x
à
Æ
â
ª
ä
å
æ
ç
}Ex
35x
Ł
Ø
Œ
º
ì
í
î
ï
36x
ð
æ
ò
ó
ô
ı
ö
}Fx
37x
ł
ø
œ
ß
ü
ý
þ
ß
}8
}9
}A
}B
}C
}D
}E
}F
Figure21.8:eT1fontlayout(TimesRoman).
encodingstandard, TeXBase1, which is used tobuildT
E
Xvirtual fontsforvarious different user en-
codings,i.e.,
ptmr7t
,
ptmr8t
,
ptmr8y
(seetheexamplesattheendofSection21.7)arevirtualfonts
referringtothesameunderlyingrawfont.SincenotallthecharactersintheCorkencodingarepresent
inatypicalPostScriptfont,itisnotpossibletosimplyre-encodethefontdirectlytothefinalform.
eraw fontencodingTeXBase1wascreated byanadhocgroupofinterestedT
E
Xfontexperts,
primarilyKarlBerry,BertholdHorn,AlanJeffrey,PierreMacKay,andSebastianRahtz.eaimwasto
makeavailablefortypesettingallthecharactersnormallyincludedinPostScriptType1fonts,i.e.,the
charactersintheAdobeStandardEncoding,ISOLatin1,plusafewextracharactersavailableinLucida
Bright.
Figure21.9onthefollowingpage shows theTeXBase1layout inaconventionalT
E
Xfont chart,
whileFigure21.8shows the layout correspondingto the
T1
encoding. More generally, Tables21.14
ch-psextra1.tex,v:2.24
2007/08/14
27
21
POSTSCRIPTFONTSANDBEYOND
Testofptmr8ronApril13, 2006at 2122
0
1
2
3
4
5
6
7
00x
}0x
01x
 
02x
}1x
03x
04x
!
"
#
$
%
&
}2x
05x
(
)
*
+
,
-
.
/
06x
0
1
2
3
4
5
6
7
}3x
07x
8
9
:
;
<
=
>
?
10x
@
A
B
C
D
E
F
G
}4x
11x
H
I
J
K
L
M
N
O
12x
P
Q
R
S
T
U
V
W
}5x
13x
X
Y
Z
[
\
]
^
_
14x
a
b
c
d
e
f
g
}6x
15x
h
i
j
k
l
m
n
o
16x
p
q
r
s
t
u
v
w
}7x
17x
x
y
z
{
|
}
~
20x
}8x
21x
22x
}9x
23x
24x
¡
¢
£
¥
ƒ
§
}Ax
25x
¤
'
«
26x
°
·
µ
}Bx
27x
»
¾
¿
30x
À
`
´
ˆ
˜
¯
˘
˙
}Cx
31x
¨
É
˚
¸
Ì
˝
˛
ˇ
32x
Ñ
Ò
Ó
Ô
Õ
Ö
×
}Dx
33x
Ø
Ù
Ú
Û
Ü
Ý
Þ
ß
34x
à
Æ
â
ª
ä
å
æ
ç
}Ex
35x
Ł
Ø
Œ
º
ì
í
î
ï
36x
ð
æ
ò
ó
ô
ı
ö
÷
}Fx
37x
ł
ø
œ
ß
ü
ý
þ
ÿ
}8
}9
}A
}B
}C
}D
}E
}F
Figure21.9:eTeXBase1fontlayout(TimesRoman).
and 21.15inAppendix21.8contrasttheseencodingswithothercommonlyusedones.
21.2.4 PostScriptfontencodings
PostScriptfontsarearrangedasasetofproceduresthatusealookuptableofnamesforthecharacters;
fontsincludeamappingbetweenthenamesandnumbers(theencodingvector),butthiscanbeeasily
changed. us, whilethecharacter
exclamdown
(¡)isoen mappedtodecimal161,itcanalwaysbe
calledbynameormappedtoanothernumber.
AnencodingvectorisanormalPostScriptarrayof256elements:
/AnEncoding [
% 256 character names follow
/grave /acute /circumflex /tilde /dieresis /hungarumlaut
28
ch-psextra1.tex,v:2.24
2007/08/14
21.2 Typography:combiningcharactersforoptimalreadability
/ring /caron
/breve /macron /dotaccent /cedilla
/ogonek /quotesinglbase /guilsinglleft /guilsinglright
. . . . ]
Whenthefontisrequested,suchavectorcanbesuppliedtooverridethedefaultencodingasspecified
inthefont. Nosinglegenerallyacceptedstandardforencodinglayoutsoffontsexists.Onlyacertain
numberofcharacters(essentiallytheASCIIset),canbefoundatcommonlyagreedpositions,butthese
arenotsufficientforserioustypesetting.
Tables21.14and21.15inAppendix21.8showthenormalRomantextcharactersandtheirposi-
tionsinthefollowingwidely-usedencodings.
EC
theLAT
E
X
T1
encoding, alsoknownas“Cork”(aertheT
E
XUsersGroupmeeting
inCork(Ireland)in1990whereitwasagreedupon);
TeXBase1
anarbitraryre-encodingto access allthestandard characters inPostScript fonts,
usedbythe
PSNFSS
virtualfonts(seeprevioussection);
ISOLatin1
theextendedASCIIsetdesignedtocoverwesternEuropeanlanguages;
Standard
thedefaultencodingforPostScriptfonts,createdbyAdobe;it doesnotencodeall
thecharactersinafont;
WindowsANSI
anon-standardextendedASCIIsimilartoISOLatin1,widelyusedduetotheMi-
crosoproductsthatsupportit;
MacRoman
theMacintoshequivalentoftheabove,usedbyallMacapplications;
PDF
anotherAdobeencoding,theinternaloneusedasstandardbythePortableDocu-
mentFormat.
WithcurrentT
E
X,PostScript,andfontstwoveryimportantfactsmustberemembered:
1. PostScript font characters are arrangedbyname—there is neither any“right”encoding,nor any
overheadinsettingupanewencoding;
2. there mayexist characters inthe font which areunencodedbydefault with the AdobeStandard
encoding.Afontcanevencontainmorethan256characters,sothatnosingleencodingcanaccess
allofthem.Insuchacasethefontcanbeloadedmorethanonce,withdifferentencodings.
21.2.4.1 Goingto16bits
eencodingsdescribeduntilnow,andthePostScriptfontsthemselves,arelimitedtothe“eight bit”
computer world, which means that each “character” code can onlytake values between0 and255.
Moderncomputeroperatingsystemsdirectlysupportatleast16bitsanduseUnicode[20]astheirna-
tiveencoding.Fontsarealsomovingto16(oreven32)bits,sothat65000(ormore)differentcharacters
canbeencoded.Forthemoment,tobeusedwithT
E
X,suchlargefontsmuststillbe“subdivided”into
subfontslimitedto256characters(see,e.g.,Section21.6.3,whichexplainshowthisishandledwiththe
OpenTypefontMinionPro.)
WorkisongoingonnewextendedversionsofT
E
XwithdirectsupportofUnicode.X
E
T
E
X,(
http:
//scripts.sil.org/xetex/
)analternative tothestandard T
E
X(orpdfT
E
X) typesettingengine,
providesenhancedsupportforUnicodeand MacOSXfontsandseveralsupportingmacropackages
to simplifythe use of XeT
E
Xwith existingLAT
E
Xdocuments and styles are alreadyavailable.Omega
(
http://omega.enstb.org/
)extendsT
E
X’s8-bitto16-bitdata-structuresforcharactersandpoint-
ers, allowsmultiple inputand output charactersets,and uses programmable filters totranslatefrom
one encoding to another, to perform contextual analysis, etc.Omega, whose prime aim is improv-
ingT
E
X’smultilingualabilitiescaneasilycopewithmultipleorcomplexlanguages,likeArabic,Indic,
Khmer,Chinese,JapaneseorKorean,inonedocument.Omegadefinesanewstandardencoding“TeX
Unicode”,whichproposesatypographicimplementationofthedataexchangeUnicodestandard.Its
ch-psextra1.tex,v:2.24
2007/08/14
29
21
POSTSCRIPTFONTSANDBEYOND
first part (UT1)covers theLatin, IPA, Greek, Cyrillicalphabets and somedingbats. esecondpart
(UT2)coversright-to-lescripts:currentlyArabic,HebrewandBerberianTifinaghandlateron,Syr-
iac.OmegawillsoonbeabletodoawaywithT
E
X’s
.tfm
,
.vf
,etc.files, and usedirectlytheinternal
tablesofOpenTypefontsfortypesetting.
21.2.5 Typesof T
E
Xfonts
Asexplainedpreviously,fortypesetingT
E
Xneedsonlythemetricinformation(
.tfm
)foreachfont.It
isuptothe
dvi
drivertopainttheglyphsontheoutputmedium.OriginallyaT
E
X-basedsystemcould
onlyusefontscreatedwithMetaFont, butthankstothevirtualfontmechanismPostScriptandother
fontscanalsobeintegrated. Ashortdescriptionoffont formats associatedwiththeMetaFont-based
fonttechnologyfollows.
21.2.5.1 e
.gf
fontformat
e
.gf
(genericfont)formatisproducedbyMetaFontwhengeneratingafont;thisisabitmapformat,
incontrast to theoutlineformat of theMetaFontfont source.It iscreated fora particular deviceata
particularsize(e.g.,at16pointsforaCanonlaserprinter).e
.gf
formatdoesnotmatchtheformat
of anyotherfont soware; it wasdesigned to be easyto produce conversionprograms to anyother
format,hencethename“generic”.MetaFontalsoproducesa
.tfm
.
Anumber of conversion programs are usuallypart of aT
E
Xsystem, themost important being
gftopk
,which produces a
.pk
file, a format understood byallmodern
dvi
driver programs. Other
programsare
gftodvi
,whichproduceslargepicturesofeverycharacterinthefont(suchasthesamples
in[9]),intended primarilyfortestoutputswhendevelopingMetaFontfonts, andtheprogram
gftype
whichtestswhetherornota
.gf
fileiscorrupted.
21.2.5.2 e
.pk
fontformat
enormalbitmapformatusedby
dvi
driversisthe“packed”form(fileextension
.pk
).isissimply
amoreefficient storage of the
.gf
format, and is usuallygenerated using
gftopk
immediatelyaer
MetaFont.esizeordevicecharacteristicscannot be changed at this stage.It is alsopossibleto use
pktogf
totranslatea
.pk
filebacktothegenericformat,and
pktype
totestitsvalidity.
eusermust keep inmind the fact that bitmap fonts cannot be scaled in size without lossof
quality,and that MetaFont generatesdifferentbitmap patternsfordifferent devices. everyprecise
tuningthat is possible usingMetaFont makes for high-qualityoutput, but hasthe disadvantagethat
fontsarenotportableamongdifferentoutputdevices(althoughinpracticemanydevices,suchas600-
dpilaserprinters,aresimilarenoughthattheycansharefontfiles).
21.2.6 Typesof PostScriptfonts
epage descriptionlanguage PostScript canbe used todescribecomplexgraphicsimagesinanef-
ficientway.InthecaseofPostScriptfonts,eachcharactercanbedescribed byasmallPostScriptpro-
gramspecifyingcharacteroutlines,i.e.,collectionsoflines,arcs,andcurves.Paintingthecharacterson
anoutputdeviceisthetaskof thePostScript interpreter, whichrasterizestheseoutlinesdynamically
andtransformsthemintoabitmapimage,takingintoaccounttheresolutionoftheoutputdevice(this
contrastswithMetaFont,which,asexplainedinSection21.2.5,performstherasterizationonceandfor
allatthestageatwhichthe
.gf
fileiscreated).
efollowingtypesofPostScriptfontsexists[2,Chapter5]:
Type0 Acompositefont,i.e.,afontcomposedofotherfonts,organizedhierarchically.Composite
30
ch-psextra1.tex,v:2.24
2007/08/14
Documents you may be interested
Documents you may be interested