Type1Font(grDevices)
Type1Font()所属R语言包:grDevices
Type 1 and CID Fonts
Type 1和CID字体
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions are used to define the translation of a R graphics font family name to a Type 1 or CID font descriptions, used by both the postscript and pdf graphics devices.
这些功能是用来定义一个R图形字体系列名称1型或CID字体描述,postscript和pdf图形设备所使用的翻译。
用法----------Usage----------
Type1Font(family, metrics, encoding = "default")
CIDFont(family, cmap, cmapEncoding, pdfresource = "")
参数----------Arguments----------
参数:family
a character string giving the name to be used internally for a Type 1 or CID-keyed font family. This needs to uniquely identify each family, so if you modify a family which is in use (see postscriptFonts) you need to change the family name.
提供用于1型或CID键控字体家族内部的名称字符串。这需要唯一标识每一个家庭,所以,如果你修改了一个家庭使用(见postscriptFonts),你需要改变姓氏。
参数:metrics
a character vector of four or five strings giving paths to the afm (Adobe Font Metric) files for the font.
特征向量的四或五串AFM(Adobe字体公制)的字体文件的路径。
参数:cmap
the name of a CMap file for a CID-keyed font.
CMap的一个为CID键控字体的文件名称。
参数:encoding
for Type1Font, the name of an encoding file. Defaults to "default", which maps on Unix-alikes to "ISOLatin1.enc" and on Windows to "WinAnsi.enc". Otherwise, a file name in the "enc" directory of the grDevices package, which is used if the path does not contain a path separator. An extension ".enc" can be omitted.
Type1Font,编码文件的名称。默认为"default",在Unix相似者映射到"ISOLatin1.enc"和Windows"WinAnsi.enc"。否则,encgrDevices包,这是用来如果路径不包含路径分隔目录中的文件名。一个扩展".enc"可以省略。
参数:cmapEncoding
The name of a character encoding to be used with the named CMap file: strings will be translated to this encoding when written to the file.
一个被命名的CMap文件中使用的字符编码的名称:字符串将被翻译书面文件时,这种编码。
参数:pdfresource
A chunk of PDF code; only required for using a CID-keyed font on pdf; users should not be expected to provide this.
一个PDF的代码块,只需要使用pdf键控的CID字体,用户不应提供。
Details
详情----------Details----------
For Type1Fonts, if four ".afm" files are supplied the fifth is taken to be "Symbol.afm". Relative paths are taken relative to the directory "<VAR>R_HOME</VAR>/library/grDevices/afm". The fifth (symbol) font must be in AdobeSym encoding. However, the glyphs in the first four fonts are referenced by name and any encoding given within the ".afm" files is not used.
Type1Fonts,如果四个.afm文件提供第五是"Symbol.afm"。相对路径是相对的目录<VAR>R_HOME</VAR>/library/grDevices/afm。第五(符号)字体必须是在AdobeSym编码。然而,在第一四种字体的字形被引用的名称,并在给定的.afm文件不使用任何编码。
As from R 2.14.0 the ".afm" files may be compressed with (or without) final extension ".gz": the files which ship with R are installed as compressed files with this extension.
2.14.0从R.afm文件可能被压缩(或无)最后一次延长“.gz:这个压缩文件安装文件船舶与R扩展。
Glyphs in CID-keyed fonts are accessed by ID (number) and not by name. The CMap file maps encoded strings (usually in a MBCS) to IDs, so cmap and cmapEncoding specifications must match. There are no real bold or italic versions of CID fonts (bold/italic were very rarely used in traditional CJK topography), and for the pdf device all four font faces will be identical. However, for the postscript device, bold and italic (and bold italic) are emulated.
CID键控字体的字形ID(数字)和叫不上名字的访问。 CMap的文件映射编码的字符串(通常在的MBCS)的ID,所以cmap和cmapEncoding规格必须匹配。有没有真正的粗体或斜体版本CID字体(粗体/斜体很少在传统的中日韩地形),pdf设备的所有四种字体将是相同的。然而,对于postscript设备,粗体和斜体(粗体斜体)效仿。
CID-keyed fonts are intended only for use for the glyphs of CJK languages, which are all monospaced and are all treated as filling the same bounding box. (Thus plotmath will work with such characters, but the spacing will be less carefully controlled than with Western glyphs.) The CID-keyed fonts do contain other characters, including a Latin alphabet: non-CJK glyphs are regarded as monospaced with half the width of CJK glyphs. This is often the case, but sometimes Latin glyphs designed for proportional spacing are used (and may look odd). We strongly recommend that CID-keyed fonts are only used for CJK glyphs.
CID键控字体仅用于为使用的字形中日韩语言,这些都是等宽,都填补了相同的边界框处理。 (因此plotmath将这些字符,但间距将仔细比西方字形控制)CID键控的字体不包含其他字符,包括拉丁字母:非中日韩字形作为等宽中日韩字形的宽度的一半。这是经常发生的情况,但有时拉丁字形比例间距设计(可能看起来很奇怪)。我们强烈建议中日韩字形,CID键控字体只使用。
值----------Value----------
A list of class "Type1Font" or "CIDFont".
一类"Type1Font"或"CIDFont"列表。
参见----------See Also----------
postscript, pdf, postscriptFonts, and pdfFonts.
postscript,pdf,postscriptFonts,pdfFonts。
举例----------Examples----------
## This duplicates "ComputerModernItalic".[#这重复“ComputerModernItalic的”。]
CMitalic <- Type1Font("ComputerModern2",
c("CM_regular_10.afm", "CM_boldx_10.afm",
"cmti10.afm", "cmbxti10.afm",
"CM_symbol_10.afm"),
encoding = "TeXtext.enc")
## Not run: [#无法运行:]
## This could be used by[#这可以使用]
postscript(family = CMitalic)
## or[#或]
postscriptFonts(CMitalic = CMitalic) # once in a session[一旦在一个会话]
postscript(family = "CMitalic", encoding = "TeXtext.enc")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|