where the character vector metrics contains the paths to the relevant .afm files, The files should be specified in this order:
You need to set a new font family for use with pdf(). This requires you to have Adobe Font Metric files (*.afm files) for the fonts you wish to use. You can convert the .tty files to .afm ones or find .afm files for Arial on the interweb if you don't already have them.
I think with substitution from Helvetica to Arial I will be ok with the ugliness, as they have quite similar character widths and especially as Plots don't have any running texts. – Oct 24 '12 at 17:59
Concerning your final question: No, you cannot substitute fonts afterwards, at least not easily. Each font has its individual character widths, and as PDF is not a reflowing format, you would get something at least very unpretty if you simply switched fonts afterwards. That, BTW, also is the reason why you generally do need the fonts (or at least their respective metrics, i.e. char widths) in any process which generates PDF. That being said there are the standard 14 fonts for which most data does not need to be included in a generated PDF. Still, for proper layouting, the metrics are needed. – Oct 24 '12 at 11:14
Or can I substitude this font in the PDF afterwards, creating a file with the font I want?
The simple problem is, that Arial is used (as I want it to be) but editing the PDF-File it says Helvetica is used. How can I get R to write the correct Name into the PDF-file. pdf(...,family="Arial") won't work, as this family is not known (grDevices version 2.15.1).
I have a problem with typefaces and PDF-Output in R. On this windows machine there is no Helvetica and the Font used by the device seems to be Arial as you can see below.
r - pdf device and font family "Arial" / Or: Change font name (not font) in PDF - Stack Overflow
Комментариев нет:
Отправить комментарий