Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"More than one version of regular/bold/italic found for Open Sans. Skipping setup for this font" problem. #48

Open
kjedrzejewski opened this issue Jun 28, 2016 · 2 comments

Comments

@kjedrzejewski
Copy link

kjedrzejewski commented Jun 28, 2016

Hi,

When I load fonts, I receive output as follows:
> loadfonts() Liberation Sans already registered with pdfFonts(). More than one version of regular/bold/italic found for Open Sans. Skipping setup for this font. Open Sans Extrabold already registered with pdfFonts(). Open Sans Semibold already registered with pdfFonts().

Function fonttable() returns following result:
fonttable

When I try to save ggplot2 graphs to PDF files with Open Sans font, it generates lots of warnings, and creates file without text.

I've tried to reinstall extrafontdb, as suggested here, but it didn't help.

What may I do to have it working properly?

@grantmcdermott
Copy link

I ran into a similar situation, having originally installed Open Sans via Typecatcher on Ubuntu 17.04.

In my case, the problem stemmed from the fact that I had two copies of the Open Sans fonts (as well as other fonts installed via Typecatcher) in different locations on my system:
/usr/share/fonts/truetype/opensans
and
~/.fonts/typecatcher

Deleting the duplicates in the latter directory and reinstalling the extrafontdb (install.packages("extrafontdb")) resolved the the problem.

@tomhopper
Copy link

Having the same problem with Open Sans (and at least one other font). Have uninstalled and reinstalled extrafontdb.

library(extrafont)
Registering fonts with R
> fonts()
NULL
> subset(fonttable(), FamilyName == "Open Sans")
Error in eval(e, x, parent.frame()) : object 'FamilyName' not found
> font_import(pattern = "Open*")
Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.
Continue? [y/n] y
Scanning ttf files in C:\WINDOWS/Fonts, C:\Users\<<user>>\AppData\Local/Microsoft/Windows/Fonts ...
Extracting .afm files from .ttf files...
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\Deleted\OpenSans-ExtraBold.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-ExtraBold
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-Bold.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-Bold
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-BoldItalic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-BoldItalic
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-ExtraBoldItalic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-ExtraBoldItalic
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-Italic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-Italic
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-Light.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-Light
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-LightItalic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-LightItalic
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-Regular.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-Regular
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-SemiBold.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-SemiBold
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSans-SemiBoldItalic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-SemiBoldItalic
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSansCondensed-Bold.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSansCondensed-Bold
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSansCondensed-Light.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSansCondensed-Light
C:\Users\<<user>>\AppData\Local\Microsoft\Windows\Fonts\OpenSansCondensed-LightItalic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSansCondensed-LightItalic
C:\Windows\Fonts\OpenSans-Bold.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-Bold
C:\Windows\Fonts\OpenSans-BoldItalic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-BoldItalic
C:\Windows\Fonts\OpenSans-Italic.ttf => C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics/OpenSans-Italic
Found FontName for 16 fonts.
Scanning afm files in C:/Users/<<user>>/R/winlibrary/extrafontdb/metrics
Writing font table in C:/Users/<<user>>/R/winlibrary/extrafontdb/fontmap/fonttable.csv
Writing Fontmap to C:/Users/<<user>>/R/winlibrary/extrafontdb/fontmap/Fontmap...
> fonts()
[1] "Open Sans"                 "Open Sans ExtraBold"       "Open Sans Light"          
[4] "Open Sans SemiBold"        "Open Sans Condensed"       "Open Sans Condensed Light"
> subset(fonttable(), FamilyName == "Open Sans")
   package                    afmfile
1       NA       OpenSans-Bold.afm.gz
2       NA       OpenSans-Bold.afm.gz
3       NA OpenSans-BoldItalic.afm.gz
4       NA OpenSans-BoldItalic.afm.gz
7       NA     OpenSans-Italic.afm.gz
8       NA     OpenSans-Italic.afm.gz
11      NA    OpenSans-Regular.afm.gz
                                                                                 fontfile
1        C:\\Users\\<<user>>\\AppData\\Local\\Microsoft\\Windows\\Fonts\\OpenSans-Bold.ttf
2                                                   C:\\Windows\\Fonts\\OpenSans-Bold.ttf
3  C:\\Users\\<<user>>\\AppData\\Local\\Microsoft\\Windows\\Fonts\\OpenSans-BoldItalic.ttf
4                                             C:\\Windows\\Fonts\\OpenSans-BoldItalic.ttf
7      C:\\Users\\<<user>>\\AppData\\Local\\Microsoft\\Windows\\Fonts\\OpenSans-Italic.ttf
8                                                 C:\\Windows\\Fonts\\OpenSans-Italic.ttf
11    C:\\Users\\<<user>>\\AppData\\Local\\Microsoft\\Windows\\Fonts\\OpenSans-Regular.ttf
                FullName FamilyName            FontName  Bold Italic Symbol afmsymfile
1         Open Sans Bold  Open Sans       OpenSans-Bold  TRUE  FALSE  FALSE         NA
2         Open Sans Bold  Open Sans       OpenSans-Bold  TRUE  FALSE  FALSE         NA
3  Open Sans Bold Italic  Open Sans OpenSans-BoldItalic  TRUE   TRUE  FALSE         NA
4  Open Sans Bold Italic  Open Sans OpenSans-BoldItalic  TRUE   TRUE  FALSE         NA
7       Open Sans Italic  Open Sans     OpenSans-Italic FALSE   TRUE  FALSE         NA
8       Open Sans Italic  Open Sans     OpenSans-Italic FALSE   TRUE  FALSE         NA
11     Open Sans Regular  Open Sans    OpenSans-Regular FALSE  FALSE  FALSE         NA

The output shows the font in both C:\Users\<<user>>\AppData... and in C:\Windows\Fonts, but in fact the physical file is only in the <<user>> location. Windows shows the font in C:\Windows\Fonts almost as if there's a symlink when the font is installed in the <<user>> location. However, there is definitely not a physical file in C:\Windows\Fonts; if I delete the .ttf from the <<user>> location, Windows continues to show the font family in C:\Windows\Fonts but is unable to display the file and, when trying to display the font in C:\Windows\Fonts, Windows reports that the file is missing from the <<user>> location.

Running on Windows 10 Enterprise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants