[cairo] Embedding phonetic symbols in R
cloos at jhcloos.com
Wed Jul 20 20:26:58 PDT 2011
>>>>> "SS" == Sverre Stausland <johnsen at fas.harvard.edu> writes:
SS> When I attempt your CairoFonts() call, I get this error message: ...
I took a look at the src. (I'll explain probably too much just in case
anyone comes across this when googling....)
Library(Cairo) loads the Cairo package from CRAN. CairoFonts() is a
function in R which calls a C function named cairo_font_set().
The latter only works if the R Cairo package is compiled with support
for fontconfig and freetype. That is the norm on linux, bsd and similar
systems, but not so typical on windows.
Digging deeper, if fontconfig and freetype are not used, then the R Cairo
package will only ever use Helvetica and Symbol. At least as of version
1.4-9. (1.4-10 is out; I haven't looked at it though.)
What you are trying to do will only work if Cairo is compiled against a
version of libcairo which is compiled with freetype and fontconfig support.
Otherwise, if you want to avoid freetype and fontconfig you'd have to
get its author to add support for user font selection on windows .
The package’s home is:
James Cloos <cloos at jhcloos.com> OpenPGP: 1024D/ED7DAEA6
More information about the cairo