Font Handling in Troff with Postscript Devices
Total Page:16
File Type:pdf, Size:1020Kb
Fo tn Hand gnil ni rT o With PostS irc pt D ve ices FONT HAND IL NG IN TROFF WITH POSTSCR PI T DEVICES GIAA4F R<HH8F op /qs/ou a Heirloom Docume tn ation Tools <h tt p://heirloom.sourceforge.net/doctools.html> T eh bas sic Heirloom rt o understands two ways ot select PostS irc pt fo .stn The cu tnerr method can access PostS irc pt fo tn les erid ct .ly Fo stn are select de usi gn an ex et nded .f‘‘ ’’p qer uest. As simple examples, .fp 0 AG gdrg____ pfb t.f AG H ere is some tex nit Adobe Garamond Regular. ro .fp 0 AG AGaramondP R-or egular otf t.f AG H ere is some tex nit Adobe Garamond orP Regular. B tu it is also possible ot have die tner names for the metrics and glyph data les, as ni .fp 0 AM myk gninre .afm gdrg____.pfb t.f AM This text nistnirp Adobe Garamond usi gn modified .gninrek The defau tl highe r-r esol tu ion ‘‘ps’’ PostS irc pt device always uses AFM les; it us pp stro the co tnevn ional .f‘‘ ’’p qer uest for backwards compatibil- ity ot select rp tsnie- alled fo stn from the PDF base set. With fo stn select de yb ht is metho ,d localized ni put orp cessi gn is -rep formed acco gnidr ot the LC_CTYPE orivne nme tn variable, ro acco gnidr ot a docume -stn ep cic value set yb the ‘‘.lc_ctype’’ qer ues :t .\" Enable lo gn qer uest names. .do fx lag 3 .\" de_DE 8ftu. is for GNU lib ;c de_DE.UTF-8 w skro elsewhe e.r .lc_ctype de_DE 8ftu. Deutscher Text mit ‹A üfn urh gn szeichen› .sp The rsif ft ive sm lal let et rs of the G er ek alphabet: α β γ δ ε Note ht at any use of AFM, Op ne Type, ro rT ueType les qer riu es ht at the output of rt o is passed ot the exactly match gni ev rsion of dpo t,s i.e. ot the one ht at was deliv dere with the same release of ht is package. eS nd- gni such rt o output erid ctly ot a tnirp ps ooler ht at vni okes a sys et m -rev sion of dpo ts w htlil su usu ally not w .kro The h rotis ical method qer riu es fo tn tables ot eb eg nerat de manual tI.ly is lilts us pp ,detro and is lilts the defau tl for the low r-re esol tu ion p‘‘ os ’’t PostS irc pt device, but it is not er commended anymo er ht at it is used for add gni fo .stn L co alized ni put orp cessi gn acco gnidr ot LC_CTYPE is not available with ht is metho .d Installing StsoP cri tp yT pe stnof Mak gni additional fo stn available is easy with the cu tnerr metho .d fI you buy a PostS irc pt Type p fo tn for use with rt o, select the Windows ev rsio .n You w lil get a set of les from the ev ndo .r Only two of them are of retni est for rt o: xxxxxxxx .afm This is the metrics le. rt o accesses it ot learn the wid sht of char- acters ni the font. .xxxxxxxx pfb This le co tn ai sn the actual glyph data. rt o does not really ne de ht is le, but the retnirp ro PDF co retrevn do nI.es many cases, it is most co nevn ie ottn include the data erid ctly otni the .ps le -neg erat ,de as ni the examples above. Create a erid ct yro ot hold your fo .stn F ro compatibility with erutuf ev rsio sn of rt o, it is er commended ht at it is put outside the rt o hie -r archy /u rs /ucblib/doctools; somet gnih below /u rs /local may eb a og od q choice. F ro each fo tn you want ot tsni ,lal co yp ro nil k both the AFM and the PFB le otni the erid ct .yro Set the TROFFONTS orivne -n me tn variable ot ht is erid ct ;yro if you have m itlu ple fo tn erid ct ro ies, you can separate them ni TROFFONTS yb colons, tsuj as ni the PATH variable for the shel ,l e.g. ‘‘TROFFONTS=/u rs /local/share/fo s:tn /u /rs share/fo stn exp tro TROFFONTS .’’ W itr e the denition ni your rp.‘‘ ole’’ ro a similar ts ar ut p le ot make it rep manent. You can now use the fo stn with rt o. fI you want ot tsni lal mo er fo stn lat ,re it is us cie tn ot put them otni the fo tn erid ct .yro Installing Open yT pe ro rT ue yT pe stnof The orp ced eru for Op ne Type and rT ueType fo stn is nearly the same as for Type p fo s,tn except ht at the er is only one le ‘‘Fo tn Name.ot ’’f ro( ‘‘Fo tn Name. ftt ’’) with them ht at co tn ai sn both metrics and glyph data. tsuJ co yp ht is le ot a erid ct yro giv ne ni the TROFFONTS pat .h sU ing Open yT pe ef at seru Hig q-h uality Op ne Type fo stn may co tn ain feat eru tables ht at allow ps e- cial typ go raphic eect .s F ro example, the Adobe Garamond orP Regular fo tn co tn ai gnilittsn capitals ht at can eb map dep ot the ni put ran eg of reg- ular capitals with the ‘‘.feat ru e’’ qer ues nit rt o: .do fx lag 3 .fp 1 R AGaramondP R-or egular otf .fp 0 T AGaramondP R-or egular otf .feat eru T +t lit REGULAR CAPITALS .sp t.f T TITLING CAPITALS r To retrie ev tisla of feat ru es ni an individual fo httn at are available with rt o, use ‘‘otfdump −s font.ot .’’f Typical usef lu feat ru es ar :e +c2sc co strevn capitals ot sm lal capitals +case subs itt tu io sn for use ni combination with tex nit c-lal apital let et rs +onum old t-s yle nume rals +pnum orp p tro ional )gninil( numerals +pnum +onum orp p tro ional old t-s yle numerals +smcp co strevn low c-re ase let et rs ot sm lal capitals +smcp +c2sc co strevn lal let et rs ot sm lal capitals +tlit gnilitt characte rs +zeor slashed ze or Feat ru es such as ‘‘aal ’’t ro nro‘‘ m’’ which only map sets of yrev eps cial characters ot die tner positio sn are normally not usef lu with rt o since these characters can eb accessed erid ctly usi gn ‘‘\[name]’’ escape sequences anyway. To make an individual al nret ate charact tre he defau t,l the ’’rt.f‘‘ re- quest can eb use :d .do fx lag 3 .fp 2 I AGaramondP tI-or alic otf rt.f I Q\[Q.swash] t.f I sUing a ws ash capital in eht wo dr ‘‘ }uali ’’y.t Feat eru mappi sgn res nitlu changes ot the same nretni al data rts uct ru es as the ’’rt.f‘‘ qer uest. tI is ht su possible ot make adj tsu me stn ot mappi sgn yb usi gn ’’rt.f‘‘ a re ‘‘.feat ru ,e’’ ro ot rc eate ep rsonalized varian st yb usi gn ’’rt.f‘‘ based on the data obtained from ‘‘otfdump −s .’’ The ‘‘.feat ru e’’ qer uest m liltstsu eb active for a fo tn when a charact re is ;detnirp disabl gni a feat eru with ‘‘.feat eru F −feat’’ only w skro complete- ly if lal of sit mappi sgn are nililts positio tI.n is ht su er commended ht at the ‘‘.feat ru e’’ qer uest is used only once for a fo itn mmediately a re it has neeb mou ,detn and ht at a fo tn is mou detn m itlu ple it mes, each it me for s ne abl gni an individual feat eru set. Doi gn so has the additional advantage ht at switch gni betw nee feat ru es is co nevn ie tn ly possible usi gn the ‘‘\f ’’ es- cape sequence. sU ing stnof wi ht old-s elyt num re als A Type p fo tn with old t-s yle numerals but otherwise ts andard characters usu ally does not qer eriu any eps cial mechanism tI. can simply eb mou -tn ,de select ,de and use .d Old t-s yle numerals co tn ained ni Op ne Type fo stn can eb accessed co vn e- nie tn ly yb mappi gn them ot the ts andard ASC II numbers with the ‘‘.fea- rut e’’ qer ues :t .do fx lag 3 .fp 1 R AGaramondP R-or egular otf .feat eru R +onum The numerals o p q r s t u v w x are ni old t-s yle. sU ing stnof wi ht small capital srettel Sm clal apital fo stn normally ne de let ret space track .gni Th su e.g ot.