找回密码
 注册
查看: 3160|回复: 0

R语言:postscriptFonts()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:08:40 | 显示全部楼层 |阅读模式
postscriptFonts(grDevices)
postscriptFonts()所属R语言包:grDevices

                                        PostScript and PDF Font Families
                                         PostScript和PDF字体家庭

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

These functions handle the translation of a R graphics font family name to a PostScript or PDF font description, used by the postscript or pdf graphics devices.
这些函数处理PostScript或PDF字体说明翻译研发的图形字体系列名称,postscript或pdf图形设备所使用。


用法----------Usage----------


postscriptFonts(...)
pdfFonts(...)



参数----------Arguments----------

参数:...
either character strings naming mappings to display, or named arguments specifying mappings to add or change.
要么命名映射到显示的字符串,或者指定命名参数映射添加或更改。


Details

详情----------Details----------

If these functions are called with no argument they list all the existing mappings, whereas if they are called with named arguments they add (or change) mappings.
如果不带参数调用这些函数,他们列出所有现有的映射,而如果他们呼吁他们增加(或更改)映射的命名参数。

A PostScript or PDF device is created with a default font family (see the documentation for postscript), but it is also possible to specify a font family when drawing to the device (for example, see the documentation for "family" in par and for "fontfamily" in gpar in the grid package).
PostScript或PDF设备创建的默认字体家族(见),但它也可以指定一个字体家族绘制的设备(例如,文档时,文档postscript<X >"family"和par"fontfamily"gpar包)。

The font family sent to the device is a simple string name, which must be mapped to a set of PostScript fonts.  Separate lists of mappings for postscript and pdf devices are  maintained for the current R session and can be added to by the user.
发送到设备的字体家族是一个简单的字符串名称,它必须被映射到一套PostScript字体。映射单独列出postscript和pdf设备维持目前的R会话,并可以由用户添加。

The postscriptFonts and pdfFonts functions can be used to list existing mappings and to define new mappings.  The Type1Font and CIDFont functions can be used to create new mappings, when the xxxFonts function is used to add them to the database.  See the examples.
postscriptFonts和pdfFonts功能,可用于列出现有的映射,并确定新的映射。 Type1Font和CIDFont功能,可用于创建新的映射,当xxxFonts函数用于将它们添加到数据库。见的例子。

Default mappings are provided for three device-independent family names: "sans" for a sans-serif font (to "Helvetica"), "serif" for a serif font (to "Times") and "mono" for a monospaced font (to "Courier").
默认映射提供三个独立于设备的姓氏:"sans"为sans-serif字体("Helvetica")"serif"serif字体("Times") "mono"等宽字体("Courier")。

Mappings for a number of standard Adobe fonts (and URW equivalents) are also provided: "AvantGarde", "Bookman", "Courier", "Helvetica", "Helvetica-Narrow", "NewCenturySchoolbook", "Palatino" and "Times"; "URWGothic", "URWBookman", "NimbusMon", "NimbusSan" (synonym "URWHelvetica"), "NimbusSanCond", "CenturySch", "URWPalladio" and "NimbusRom" (synonym "URWTimes").
还提供标准Adobe字体(和URW等值)的映射:"AvantGarde","Bookman","Courier","Helvetica","Helvetica-Narrow",<X >,"NewCenturySchoolbook"和"Palatino";"Times","URWGothic","URWBookman","NimbusMon"(同义词"NimbusSan")<X >,"URWHelvetica","NimbusSanCond"和"CenturySch"(同义词"URWPalladio")。

There are also mappings for "ComputerModern" and "ComputerModernItalic".
也有映射"ComputerModern"和"ComputerModernItalic"。

Finally, there are some default mappings for East Asian locales described in a separate section.
最后,还有一些默认映射为一个单独的章节中所描述的东亚语言环境。

The specification of font metrics and encodings is described in the help for the postscript function.
字体规格和编码规范描述在postscript函数的帮助。

The fonts are not embedded in the resulting PostScript or PDF file, so software including the PostScript or PDF plot file should either embed the font outlines (usually from ".pfb" or ".pfa" files) or use DSC comments to instruct the print spooler or including application to do so (see also embedFonts).
没有嵌入字体中所产生的PostScript或PDF文件,所以包括PostScript或PDF打印文件的软件应嵌入字体轮廓(通常是从.pfb或.pfa文件),或者使用DSC注释指示打印后台处理程序,包括应用程序,这样做的(又见embedFonts)。

A font family has both an R-level name, the argument name used when postscriptFonts was called, and an internal name, the family component.  These two names are the same for all the pre-defined font families.
A字型的家庭,有一个R级名称,使用时postscriptFonts被称为参数的名称,内部名称,family组件。这两个名字是相同的所有预定义的字体家庭。

Once a font family is in use it cannot be changed.  "In use" means that it has been specified via a family or fonts argument to an invocation of the same graphics device already in the R session.  (For these purposes xfig counts the same as postscript but only uses some of the predefined mappings.)
一旦字体家庭使用的是它不能改变的。 “在使用”的手段,它已通过family或fonts参数相同的图形设备已经在R会话调用指定。 (对于这些目的xfig计算postscript的相同,但只使用一些预定义的映射)。


值----------Value----------

A list of one or more font mappings.
一个或多个字体映射列表。


东亚字体----------East Asian fonts----------

There are some default mappings for East Asian locales:<br> "Japan1", "Japan1HeiMin", "Japan1GothicBBB", and "Japan1Ryumin" for Japanese; "Korea1" and "Korea1deb" for Korean; "GB1" (Simplified Chinese) for mainland China and Singapore; "CNS1" (Traditional Chinese) for Hong Kong and Taiwan.
有一些东亚语言环境的默认映射:参考"Japan1","Japan1HeiMin","Japan1GothicBBB"和"Japan1Ryumin"日本"Korea1"和"Korea1deb"的韩国"GB1"(简体中文)中国大陆和新加坡;"CNS1"(繁体中文)香港和台湾。

These refer to the following fonts
这是指下列字体

HeiseiKakuGo-W5
HeiseiKakuGo-W5

Linotype Japanese printer font
行型活字日本打印机字体

KozMinPro-Regular-Acro
KozMinPro-Regular-Acro

from Adobe Reader 7.0 Japanese Font Pack
Adobe Reader 7.0的日文字体包

HeiseiMin-W3
HeiseiMin-W3

Linotype Japanese printer font
行型活字日本打印机字体

HeiseiMin-W3-Acro
HeiseiMin-W3-Acro

from Adobe Reader 7.0 Japanese Font Pack
Adobe Reader 7.0的日文字体包

GothicBBB-Medium
GothicBBB-Medium

Japanese-market PostScript printer font
日本市场的PostScript打印机字体

Ryumin-Light
Ryumin-Light

Japanese-market PostScript printer font
日本市场的PostScript打印机字体

Baekmuk-Batang
Baekmuk-Batang

TrueType font found on some Linux systems
TrueType字体在某些Linux系统

HYSMyeongJoStd-Medium-Acro
HYSMyeongJoStd-Medium-Acro

from Adobe Reader 7.0 Korean Font Pack
Adobe Reader 7.0的韩文字体包

Batang-Regular
Batang-Regular

another name for Baekmuk-Batang
baekmuk有关,巴塘的另一个名字

HYGothic-Medium-Acro
HYGothic-Medium-Acro

from Adobe Reader 4.0 Korean Font Pack
从Adobe Reader 4.0的韩文字体包

BousungEG-Light-GB
BousungEG-Light-GB

TrueType font found on some Linux systems
TrueType字体在某些Linux系统

STSong-Light-Acro
STSong-Light-Acro

from Adobe Reader 7.0 Simplified Chinese Font Pack
从Adobe Reader 7.0简体中文字体包

MOESung-Regular
MOESung-Regular

Ken Lunde's CJKV resources
肯·伦德的CJKV资源

MSungStd-Light-Acro
MSungStd-Light-Acro

from Adobe Reader 7.0 Traditional Chinese Font Pack
Adobe Reader 7.0的繁体中文字体包

Baekmuk-Batang can be found at ftp://ftp.mizi.com/pub/baekmuk/. BousungEG-Light-GB can be found at ftp://ftp.gnu.org/pub/non-gnu/chinese-fonts-truetype/. Ken Lunde's CJKV resources are at ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/samples/. These will need to be installed or otherwise made available to the postscript/PDF interpreter such as ghostscript (and not all interpreters can handle TrueType fonts).
Baekmuk-Batang可以找到ftp://ftp.mizi.com/pub/baekmuk/。 BousungEG-Light-GB可以找到ftp://ftp.gnu.org/pub/non-gnu/chinese-fonts-truetype/。肯·伦德的的CJKV资源是在ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/samples/。这将需要安装或以其他方式提供的解释,如Ghostscript(而不是所有的口译员可以处理TrueType字体)的PostScript / PDF。

You may well find that your postscript/PDF interpreters has been set up to provide aliases for many of these fonts.  For example, ghostscript on Windows can optionally be installed to map common CJK fonts names to Windows TrueType fonts.  (You may want to add the -Acro versions as well.)
你可能会发现您的PostScript / PDF格式口译员已成立,以提供这些字体的许多别名。例如,可以选择安装在Windows上的ghostscript常见的中日韩字体名称映射到Windows TrueType字体。 (您可能要添加-Acro版本。)

Adding a mapping for a CID-keyed font is for gurus only.
添加了为CID键控字体的映射是大师唯一的。


作者(S)----------Author(s)----------



Support for Computer Modern fonts is based on a contribution by
Brian D'Urso <a href="mailto:durso@hussle.harvard.edu">durso@hussle.harvard.edu</a>.




参见----------See Also----------

postscript and pdf;  Type1Font and CIDFont for specifying new font mappings.
postscript和pdf;Type1Font和CIDFont指定新的字体映射。


举例----------Examples----------


postscriptFonts()
## 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")
postscriptFonts(CMitalic = CMitalic)

## A CID font for Japanese using a different CMap and[#CID字体使用不同的CMap日本和]
## corresponding cmapEncoding.[#相应cmapEncoding。]
`Jp_UCS-2` <- CIDFont("TestUCS2",
                  c("Adobe-Japan1-UniJIS-UCS2-H.afm",
                    "Adobe-Japan1-UniJIS-UCS2-H.afm",
                    "Adobe-Japan1-UniJIS-UCS2-H.afm",
                    "Adobe-Japan1-UniJIS-UCS2-H.afm"),
                  "UniJIS-UCS2-H", "UCS-2")
pdfFonts(`Jp_UCS-2` = `Jp_UCS-2`)
names(pdfFonts())

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 09:20 , Processed in 0.046652 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表