⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ttf2tfm.1

📁 字体缩放显示
💻 1
📖 第 1 页 / 共 2 页
字号:
KS X 1001 (Wansung)	5.brKS X 1001 (Johab)	6.brUCS-4	10.PPThe program will abort if you specify an invalid platform/encoding IDpair.It will then show the possible pid/eid pairs.Please note that most fonts have at most two or three cmaps, usuallycorresponding to the pid/eid pairs (1,0), (3,0), or (3,1) in case ofLatin based fonts.Valid Microsoft fonts should have a (3,1) mapping table, but somefonts exist (mostly Asian fonts) which have a (3,1) cmap not encodedin Unicode.The reason for this strange behavior is the fact that some oldMS\ Windows versions will reject fonts having a non-(3,1) cmap (sinceall non-Unicode Microsoft encoding IDs are for Asian MS\ Windowsversions)..PPThe.B \-Pand.B \-Eoptions of.B ttf2tfmmust be equally specified for.BR ttf2pk ;the corresponding parameters in a map file are `Pid' and `Eid',respectively..PPThe default pid/eid pair is (3,1)..PPSimilarly, an.B \-foption must be specified as `Fontindex' parameter in a map file..PPIf you use the.B \-Nswitch, all cmaps are ignored, using only the PostScript names in theTrueType font.The corresponding option in a map file is \%`PS=Only'.If you use the.B \-nswitch, the default glyph names built into.B ttf2tfmare replaced with the PS glyph names found in the font.In many cases this is not what you want because the glyph names in thefont are often incorrect or non-standard.The corresponding option in a map file is \%`PS=Yes'..PPSingle replacement glyph names specified with.B \-rmust be given directly as `\c.IR "old-glyphname new-glyphname" 'in a map file;.B \-Ris equivalent to the `Replacement' option....SH INPUT AND OUTPUT ENCODINGSYou must specify the encoding vectors from the TrueType font to theraw \*(TXfont and from the raw \*(TXfont to the virtual \*(TXfont exactly as with.BR afm2tfm ,but you have more possibilities to address the character codes.[With `encoding vector' a mapping table with 256\ entries in form of aPostScript vector is meant; see the file.C \%T1-WGL4.encof this package for an example.]With.BR afm2tfm ,you must access each glyph with its Adobe glyph name, e.g.\ \c\%`/quotedsingle' or \%`/Acircumflex'.This has been extended with.BR ttf2tfm ;now you can (and sometimes must) access the code points and/or glyphsdirectly, using the following syntax for specifying the character positionin decimal, octal, or hexadecimal notation:`/.c\c.IR <decimal-number> ',`/.c0\c.IR <octal-number> ',or `/.c0x\c.IR <hexadecimal-number> '.Examples: \%`/.c72', \%`/.c0646', \%`/.c0x48'.To access a glyph index directly, use the character `g' instead of `c' inthe just introduced notation.Example: \%`/.g0x32'.[Note: The `.cXXX' notation makes no sense if.B \-Nis used.].PPFor pid/eid pairs (1,0) and (3,1), both.B ttf2tfmand.B ttf2pkrecognize built-in default Adobe glyph names; the former follows the namesgiven in Appendix\ E of the book `Inside Macintosh', volume\ 6, the latteruses the names given in the TrueType Specification (WGL4, a Unicode subset).Note that Adobe names for a given glyph are often not unique and dosometimes differ, e.g., many PS fonts have the glyph `mu', whereas thisglyph is called `mu1' in the WGL4 character set to distinguish it from thereal Greek letter mu.Be also aware that OpenType (i.e. TrueType\ 2.0) fonts use an updated WGL4table; we use the data from the latest published TrueType specification(1.66).You can find those mapping tables in the source code file.C \%ttfenc.c ..PPOn the other hand, the switches.B \-nand.B \-Nmakes.B ttf2tfmread in and use the PostScript names in the TrueType font itself (storedin the `post' table) instead of the default Adobe glyph names..PPUse the.B \-rswitch to remap single glyph names and.B \-Rto specify a file containing replacement glyph name pairs..PPIf you don't select an input encoding, the first 256\ glyphs of theTrueType font with a valid entry in the selected cmap will be mappedto the \*(TXraw font (without the.B \-qoption,.B ttf2tfmprints this mapping table to standard output), followed by all glyphsnot yet addressed in the selected cmap.However, some code points for the (1,0) pid/eid pair are omitted sincethey do not represent glyphs useful for \*(TX:0x00 (null), 0x08 (backspace), 0x09 (horizontal tabulation), 0x0d(carriage return), and 0x1d (group separator).The `invalid character' with glyph index\ 0 will be omitted too..PPIf you select the.B \-Nswitch, the first 256\ glyphs of the TrueType font with a valid PostScriptname will be used in case no input encoding is specified.Again, some glyphs are omitted:  `.notdef', `.null', and`nonmarkingreturn'..PPIf you don't select an  output encoding,.B ttf2tfmuses the same mapping table as.B afm2tfmwould use (you can find it in the source code file.C \%texenc.c );it corresponds to \*(TXtypewriter text.Unused positions (either caused by empty code points in the mappingtable or missing glyphs in the TrueType font) will be filled (ratherarbitrarily) with characters present in the input encoding but notspecified in the output encoding (without the.B \-qoption.B ttf2tfmprints the final output encoding to standard output).Use the.B \-uoption if you want only glyphs in the virtual font which are definedin the output encoding file, and nothing more..PPOne feature missing in.B afm2tfmhas been added which is needed by \*(LX's T1 encoding:.B ttf2tfmwill construct the glyph `Germandbls' (by simply concatenating two `S'glyphs) even for normal fonts if possible.It appears in the glyph list as the last item, marked with an asterisk.Since this isn't a real glyph it will be available only in the virtualfont..PPFor both input and output encoding, an empty code position isrepresented by the glyph name \%`/.notdef'..PPIn encoding files, you can use `\\' as the final character of a line toindicate that the input is continued on the next line.The backslash and the following newline character will be removed..PP...SH SUBFONT DEFINITION FILESCJKV (Chinese/Japanese/Korean/old Vietnamese) fonts usually containseveral thousand glyphs; to use them with \*(TXit is necessary to split such large fonts into subfonts.Subfont definition files (usually having the extension `\c.C \&.sfd ')are a simple means to do this smoothly..PPA subfont file name usually consists of a prefix, a subfont infix, anda postfix (which is empty in most cases), e.g..PP.in +2mntukai23 \(-> prefix: ntukai, infix: 23, postfix: (empty).PPHere the syntax of a line in an.C SFDfile, describing one subfont.The hash character `#' starts a comment; the remainder of the current lineis ignored..in +2m.TP.I <whitespace> <infix> <whitespace> <ranges> <whitespace>.sp.TP.IR <infix> \ :=anything except whitespace.It is best to use only alphanumerical characters..TP.IR <whitespace> \ :=space, formfeed, carriage return, horizontal and vertical tabs -- nonewline characters..TP.IR <ranges> \ :=.IR "<ranges> <whitespace> <codepoint>" \ |.br.IR "<ranges> <whitespace> <range>" \ |.br.I <ranges> <whitespace> <offset> <whitespace> <range>.TP.IR <codepoint> \ :=.I <number>.br.TP.IR <range> \ :=.IR <number> \ `_' \ <number>.br.TP.IR <offset> \ :=.IR <number> \ `:'.TP.IR <number> \ :=hexadecimal (prefix `0x'), decimal, or octal (prefix `0').PPA line can be continued on the next line with a backslash ending the line.The ranges must not overlap; offsets have to be in the range 0-255..PPExample:.PP.in +2mThe line.PP.in +4m.C "03   10: 0x2349 0x2345_0x2347".PP.in +2massigns to the code positions 10, 11, 12, and\ 13 of the subfonthaving the infix `03' the character codes 0x2349, 0x2345, 0x2346, and0x2347 respectively..PPThe.C SFDfiles in the distribution are customized for the CJK package for\*(LX..PPYou have to embed the.C SFDfile name into the.C TFMfont name (at the place where the infix will appear) surrounded by two`@' signs, on the command line resp.\ a map file;both.B ttf2tfmand.B ttf2pkswitch then to subfont mode..PPIt is possible to use more than a single.C SFDfile by separating them with commata and no whitespace; for a givensubfont, the first file is scanned for an entry, then the next file,and so on.Later entries override entries found earlier (possibly only partially).For example, the first.C SFDfile sets up range 0x10-0xA0, and the next one modifies entries0x12 and 0x25.As can be easily seen, this algorithm allows for adding and replacing,but not for removing entries..PPSubfont mode disables the options .BR \-n , " \-N" , " \-p" ,.BR \-r , " \-R" , " \-t" ,.BR \-T , " \-u" , " \-v" , " \-V"and.B \-wfor.BR ttf2tfm ;similarly, no `Encoding' or `Replacement' parameter is allowed ina map file.Single replacement glyph names are ignored too..PP.B ttf2tfmwill create all subfont.C TFMfiles specified in the.C SFDfiles (provided the subfont contains glyphs) in one run..PPExample:.PP.in +2mThe call.PP.in +4m.C "ttf2tfm ntukai.ttf ntukai@Big5,Big5-supp@".PP.in +2mwill use.C Big5.sfdand.C Big5-supp.sfd ,producing.I allsubfont files.C ntukai01.tfm ,.C ntukai02.tfm ,etc....SH "RETURN VALUE"ttf2tfm returns 0 on success and 1 on error; warning and errormessages are written to standard error....SH "SOME NOTES ON FILE SEARCHING"Both.B ttf2pkand.B ttf2tfmuse either the.BR kpathsea ,.BR emtexdir ,or.B MiK\*(TXlibrary for searching files .RB ( emtexdirwill work only on operating systems which have an MS-DOSish background, i.e.MS-DOS, OS/2, Windows;.B Mik\*(TXis specific to MS Windows)..PPAs a last resort, both programs can be compiled without a search library;the searched files must be then in the current directory or specified with apath.Default extensions will be appended also (with the exception that only `\c.C \&.ttf 'is appended and not `\c.C \&.ttc ')....SS kpathseaPlease note that older versions of.B kpathsea(<3.2) have no special means to seach for TrueType fonts and relatedfiles, thus we use the paths for PostScript related stuff.The actual version of kpathsea is displayed on screen if you calleither.B ttf2pkor.B ttf2tfmwith the.B \-\^\-versioncommand line switch..PPHere is a table of the file type and the corresponding.B kpathseavariables..C TTF2PKINPUTSand.C TTF2TFMINPUTSare program specific environment variables introduced in.B kpathseaversion\ 3.2:.PP.in +4m.ta 2i.br.C \&.ttf \ and "\ .ttc	TTFONTS".br.C "ttf2pk.cfg	TTF2PKINPUTS".br.C "\&.map	TTF2PKINPUTS".br.C "\&.enc	TTF2PKINPUTS, TTF2TFMINPUTS".br.C "\&.rpl	TTF2PKINPUTS, TTF2TFMINPUTS".br.C "\&.tfm	TFMFONTS".br.C "\&.sfd	TTF2PKINPUTS, TTF2TFMINPUTS".PPAnd here the same for pre-3.2-versions of.B kpathsea:.PP.in +4m.ta 2i.br.C \&.ttf \ and "\ .ttc	T1FONTS".br.C "ttf2pk.cfg	TEXCONFIG".br.C "\&.map	TEXCONFIG".br.C "\&.enc	TEXPSHEADERS".br.C "\&.rpl	TEXPSHEADERS".br.C "\&.tfm	TFMFONTS".br.C "\&.sfd	TEXPSHEADERS".PPFinally, the same for pre-3.0-versions (as used e.g. in te\*(TX\ 0.4):.PP.in +4m.ta 2i.br.C \&.ttf \ and "\ .ttc	DVIPSHEADERS".br.C "ttf2pk.cfg	TEXCONFIG".br.C "\&.map	TEXCONFIG".br.C "\&.enc	DVIPSHEADERS".br.C "\&.rpl	DVIPSHEADERS".br.C "\&.tfm	TFMFONTS".br.C "\&.sfd	DVIPSHEADERS".PPPlease consult the info files of.B kpathseafor details on these variables.The decision whether to use the old or the new scheme will be doneduring compilation..PPYou should set the.C TEXMFCNFvariable to the directory where your.C texmf.cnfconfiguration file resides..PPHere is the proper command to find out to which value a.B kpathseavariable is set (we use.C TTFONTSas an example).This is especially useful if a variable isn't set in.C texmf.cnfor in the environment, thus pointing to the default value which ishard-coded into the.B kpathsealibrary..PP.in +2m.C "kpsewhich -progname=ttf2tfm -expand-var='$TTFONTS'".PPWe select the program name also since it is possible to specifyvariables which are searched only for a certain program -- in ourexample it would be.C TTFONTS.ttf2tfm ..PPA similar but not identical method is to say.PP.in +2m.C "kpsewhich -progname=ttf2tfm -show-path='truetype fonts'".PP[A full list of format types can be obtained by saying `\c.C "kpsewhich --help" 'on the command line prompt.]This is exactly how.B ttf2tfm(and.BR ttf2pk )searches for files; the disadvantage is that all variables are expandedwhich can cause very long strings....SS emtexdirHere the list of suffixes and their related environment variables to beset in.C autoexec.bat(resp. in.C config.sysfor OS/2):.PP.in +4m.ta 2i.br.C \&.ttf \ and "\ .ttc	TTFONTS".br.C "ttf2pk.cfg	TTFCFG".br.C "\&.map	TTFCFG".br.C "\&.enc	TTFCFG".br.C "\&.rpl	TTFCFG".br.C "\&.tfm	TEXTFM".br.C "\&.sfd	TTFCFG".PPIf one of the variables isn't set, a warning message is emitted.The current directory will always  be searched.As usual, one exclamation mark appended to a directory path causessubdirectories one level deep to be searched, two exclamation marks causeall subdirectories to be searched.Example:.PP.in +2m.C TTFONTS=c:\\\\fonts\\\\truetype!!;d:\\\\myfonts\\\\truetype!.PPConstructions like `\c.C c:\\\\fonts!!\\\\truetype 'aren't possible....SS MiK\*(TXBoth.B ttf2tfmand.B ttf2pkhave been fully integrated into.BR MiK\*(TX .Please refer to the documentation of.B MiK\*(TXfor more details on file searching....SH PROBLEMSMany.B vptovfimplementations allow only 100\ bytes for the.C TFMheader (the limit is 1024 in the.C TFMfile format itself): 8\ bytes for checksum and design size, 40\ bytes for thefamily name, 20\ bytes for the encoding, and 4\ bytes for a face byte.There remain only 28\ bytes for some additional information which is used by.B ttf2tfmfor an identification string (which is essentially a copy of the commandline), and this limit is always exceeded.The optimal solution is to increase the value of.I \%max_header_bytesin the file.C vptovf.web(and probably.C pltotf.webtoo) to, say,\ 400and recompile.B vptovf(and.BR pltotf ).Otherwise you'll get some (harmless) error messages like.PP.in +2m.C "This HEADER index is too big for my present table size".PPwhich can be safely ignored....SH "SEE ALSO".BR ttf2pk (1),.BR afm2tfm (1),.BR vptovf (1),.brthe info pages for.B dvipsand.B kpathsea...SH AVAILABILITY.B ttf2tfmis part of the FreeType\ 1 package, a high quality TrueType renderinglibrary....SH AUTHORSWerner LEMBERG.C <wl@gnu.org>.brFr\('ed\('eric LOYER.C <loyer@ensta.fr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -