Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205278

some fonts not available for pdf or postscript device in extrafont

$
0
0

In order to use different fonts for my plots, I installed the extrafont package on my Win10 machine. I run the following code:

library (extrafont)  
font_import ()
loadfonts (device = "win") 

which works finde. However, when I want to print a pdf, the font I need is still not available. So I run

loadfonts (device = "pdf") 

For the font that I want (ChantillyLH), this gives me: More than one version of regular/bold/italic found for ChantillyLH. Skipping setup for this font.

Other people had the same issue. However, the solutions that I found (e.g. https://github.com/wch/extrafont/issues/16) didn't work for me. I re-installed the extrafont-package (also the extrafontdb and the Rttf2pt1 package) and removed the ChantillyLH-files from the fonts directory. I then installed ChantillyLH and extrafontagain, but the problem remained. I suppose that this is due to ChantillyLH not following the standard-scheme of "normal", "bold", "italic" and "bolditalic" style:

enter image description here

> subset (fonttable(), FamilyName == "ChantillyLH")

gives me

  package         afmfile                           fontfile                FullName  FamilyName               FontName  Bold Italic Symbol afmsymfile
5      NA CHANLH__.afm.gz MY_FOLDER\\Chantilly\\CHANLH__.TTF       ChantillyLH Heavy ChantillyLH       ChantillyLHHeavy FALSE  FALSE  FALSE         NA
6      NA CHANLHI_.afm.gz MY_FOLDER\\Chantilly\\CHANLHI_.TTF ChantillyLH HeavyItalic ChantillyLH ChantillyLHHeavyItalic FALSE   TRUE  FALSE         NA
7      NA CHANLL__.afm.gz MY_FOLDER\\Chantilly\\CHANLL__.TTF       ChantillyLH Light ChantillyLH       ChantillyLHLight FALSE  FALSE  FALSE         NA
8      NA CHANLLI_.afm.gz MY_FOLDER\\Chantilly\\CHANLLI_.TTF ChantillyLH LightItalic ChantillyLH ChantillyLHLightItalic FALSE   TRUE  FALSE         NA

The is no bold option available (due to ChantillyLH Heavy being a "bold" font, I think). Are there any ideas what I can do to make ChantillyLH work with .pdf or postscript within R?

EDIT: I even tried and removed the file "ChantillyLH Schwarz" and reinstalled extrafont - without success.


Viewing all articles
Browse latest Browse all 205278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>