Giter Site home page Giter Site logo

Comments (22)

Bustami avatar Bustami commented on August 9, 2024 86

I was dealing with this issue on Windows 10 until yesterday.
I found this solution and now the package {extrafont} works fine.
Problem with function "font_import()" was solved this way:

library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
library(extrafont)
loadfonts(device = "win")
fonts()

from extrafont.

DavidZenz avatar DavidZenz commented on August 9, 2024 14

I was dealing with this issue on Windows 10 until yesterday.
I found this solution and now the package {extrafont} works fine.
Problem with function "font_import()" was solved this way:

library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
library(extrafont)
loadfonts(device = "win")
fonts()

worked for me too, but you will have to add

import_fonts() before loadfonts(device = "win")

from extrafont.

beanumber avatar beanumber commented on August 9, 2024 8

@moritzpschwarz I have this problem for all font files, using Ubuntu 20.04. I don't think the problem is the files themselves, as they were working with extrafont on previous version of Ubuntu and R.

@wch What are the limitations of ttf2pt1 and how could this problem resurface if the ttf2pt1 hasn't changed?

from extrafont.

Romain-B avatar Romain-B commented on August 9, 2024 6
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")

worked fine for me as well, on Unix (R v4.1.1).

Thanks for the fix @Bustami !

from extrafont.

pteridin avatar pteridin commented on August 9, 2024 4

Problem occuring in Windows as well. All fonts are affected as well.

from extrafont.

moritzpschwarz avatar moritzpschwarz commented on August 9, 2024 3

I have encountered the same issue on Windows, is there any solution to this? The file permissions are in order.

I provided further details on a Stackoverflow post

I have tried to provide a workaround in the Stackoverflow post. I'm guessing that the issue is connected to a faulty .ttf file. Using the open-source software FontForge to re-save the .ttf file did the trick for me.

from extrafont.

Jim89 avatar Jim89 commented on August 9, 2024 2

Realise this issue is now over 3 years old, but I encountered a similar problem with a font with 'No FontName'.

Turned out the .tff file permissions were different from the other fonts on my system (Mac, for reference). Setting the font file to be rwx for the 'other' user with $ chmod +orwx [font file] fixed the issue for me.

from extrafont.

psychtek avatar psychtek commented on August 9, 2024 2

I was dealing with this issue on Windows 10 until yesterday.
I found this solution and now the package {extrafont} works fine.
Problem with function "font_import()" was solved this way:
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
library(extrafont)
loadfonts(device = "win")
fonts()

worked for me too, but you will have to add
import_fonts() before loadfonts(device = "win")

I tried these recommendations on a mac (iOS 10.15.7). Didn't work for me.

Having same issue today:

R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.5.2

from extrafont.

don-reba avatar don-reba commented on August 9, 2024 1

Ran into the same problem. Ttf2pt1 seemed to have encoding issues. Fixed it by renaming the font with the freeware CR8 Type Light: I left all the names as they were, saved a copy of the font in a folder, and installed it with font_import(paths=<folder>).

from extrafont.

michaellatter avatar michaellatter commented on August 9, 2024 1

Try the showtext package for adding fonts to r, its an alternative to extrafont that I have had a lot more success with.

https://cran.rstudio.com/web/packages/showtext/vignettes/introduction.html

from extrafont.

mvuorre avatar mvuorre commented on August 9, 2024 1

For those of you who have problems with this on a mac, try installing the xcode command line tools (and approve):

xcode-select --install
sudo xcodebuild -license accept

This works with extrafont 0.17 on macOS 12.0.1.

from extrafont.

robbienukes avatar robbienukes commented on August 9, 2024 1

I was dealing with this issue on Windows 10 until yesterday.
I found this solution and now the package {extrafont} works fine.
Problem with function "font_import()" was solved this way:
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
library(extrafont)
loadfonts(device = "win")
fonts()

worked for me too, but you will have to add

import_fonts() before loadfonts(device = "win")

This worked for me but I had to use font_import() before loadfonts(device = "win") instead of import_fonts()

Using Windows 11

from extrafont.

wch avatar wch commented on August 9, 2024 1

I have a possible fix in the Rttf2pt1 package (wch/Rttf2pt1#20). If you would like to try it out, please install this build of Rttf2pt1 the following and let me know how it goes:

library(remotes)
remotes::install_github("wch/Rttf2pt1#20")

from extrafont.

wch avatar wch commented on August 9, 2024

Unfortunately, these warnings are due to limitations in the ttf2pt1 program (the program hasn't been updated in many years) which extrafont uses via the Rttf2pt1 package.

from extrafont.

amackey avatar amackey commented on August 9, 2024

Unfortunately, it also means I can't import the font I want using
ttf_import(), it seems to gets skipped

On Fri, Oct 18, 2013 at 12:07 PM, Winston Chang [email protected]:

Unfortunately, these warnings are due to limitations in the ttf2pt1
program (the program hasn't been updated in many years) which extrafont
uses via the Rttf2pt1 package.


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-26608070
.

from extrafont.

davidmetzlaff avatar davidmetzlaff commented on August 9, 2024

I have encountered the same issue on Windows, is there any solution to this? The file permissions are in order.

I provided further details on a Stackoverflow post

from extrafont.

Stan1778 avatar Stan1778 commented on August 9, 2024

I was dealing with this issue on Windows 10 until yesterday.
I found this solution and now the package {extrafont} works fine.
Problem with function "font_import()" was solved this way:
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
library(extrafont)
loadfonts(device = "win")
fonts()

worked for me too, but you will have to add

import_fonts() before loadfonts(device = "win")

I tried these recommendations on a mac (iOS 10.15.7). Didn't work for me.

from extrafont.

mabuimo avatar mabuimo commented on August 9, 2024

I have the same problems in Windows.

require(extrafontdb)
require(Rttf2pt1)
library(extrafont)
font_import()

And I always get this message for all fonts:
C:\Windows\Fonts\ARIALNBI.TTF : No FontName. Skipping.

from extrafont.

clairerichardsRN avatar clairerichardsRN commented on August 9, 2024

I'm having the same problems and I had to install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/ first
And I followed the above recs and it worked. Thanks so much

from extrafont.

kkulbir avatar kkulbir commented on August 9, 2024

I was dealing with this issue on Windows 10 until yesterday.
I found this solution and now the package {extrafont} works fine.
Problem with function "font_import()" was solved this way:
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
library(extrafont)
loadfonts(device = "win")
fonts()

worked for me too, but you will have to add
import_fonts() before loadfonts(device = "win")

I tried these recommendations on a mac (iOS 10.15.7). Didn't work for me.

Having same issue today:

R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.5.2

@psychtek Were you able to figure out a solution, I have the same issue and work on macOS Big Sur

from extrafont.

arunktiit avatar arunktiit commented on August 9, 2024

Try the showtext package for adding fonts to r, its an alternative to extrafont that I have had a lot more success with.

https://cran.rstudio.com/web/packages/showtext/vignettes/introduction.html

The suggestion above by @michaellatter works seamlessly! I work with Mac OS Monterey 12.0.1. Thank you.

from extrafont.

sjewo avatar sjewo commented on August 9, 2024

Thank you very much for fixing this issue!

The fix works for me on
R version 4.2.2 (2022-10-31)
MacOS 13.1, Apple M1

A strange observation for a pdf export: The "preview" application on Mac OS X does not use the correct fonts, while Inkscape (and poppler) display the plot correctly.

from extrafont.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.