Comments (7)
I think this is due to a bug in the embedFonts
function (from grDevices), which is called by embed_fonts
:
library(ggplot2)
qplot(1:3, 1:3)
ggsave('foo 2.pdf')
embedFonts('foo 2.pdf') # Error
But it looks like you can make it work if you put quotes in the filename (this makes the output format auto-detection fail, so you also need to specify the output format).
embedFonts("'foo 2.pdf'", format="pdfwrite")
from extrafont.
Fixed in 3dbbbc7.
from extrafont.
Is it time to remove enquoting? It looks like original bug has been fixed. Now I'm getting an error that file with extra single quotes can't be found.
from extrafont.
Hm, this will have to be done with an R version check. Something like this:
if (getRversion() <= numeric_version("2.15.2")) {
# Add quotes (or perhaps use shQuote)
}
@mlt if I push a branch with this modification, could you test it on your system for me? I don't have the development version of R installed.
from extrafont.
I don't have the development version of R installed.
I don't know what was actually going on with my installation as I'm also using stable 2.15.2 (under MS Windows). I suspect it might be related to GS update as I might have used 8.63 and when I moved to 9.05 (and 9.06) it did not like single quotes.
First time I though grDevices package was updated along with other updates I installed. But it looks like it is not the case.
Long story short... perhaps I had another issue that recent version of GS does not like single quotes under MS Windows. With shQuote
in your development branch it works.
from extrafont.
I'm going to revert the version check part. I had assumed that you were using the development version of R, since the embedFonts bug was fixed only a week or two ago and you suggested that it was causing new problems.
from extrafont.
you suggested that it was causing new problems
I did not. With you version as is, it works.
I do not even have spaces in file names, only underscores. I was just surprised why previous installation suddenly quit working. I though grDevices could be updated independently from the rest. I thought I was using 2.15.2 with newer grDevices. But now I tend to think that single quotes were passed as is to GS and newer version was not happy about it.
from extrafont.
Related Issues (20)
- Easy speed-up possible? HOT 1
- R 4.4.0 breaks some user-installed fonts in PDFs
- font_import() fails if extrafont is installed read-only
- `argument is of length zero` error in `afm_scan_files`
- wish: sort `fonts()` alphabetically HOT 1
- new font is ignored
- Using extrafont within knitr to pdf HOT 1
- windowFonts() not recognized in .Rprofile HOT 3
- how to install the font of "Young" in Mac?
- "GhostScript was not found" on M1 Big Sur Mac HOT 2
- Correctly finds font directory, but says "No FontName. Skipping" for all fonts HOT 29
- font_import segfaults. HOT 3
- a problem when I ues font_import
- Installing a font from .otf/.ttf files
- Seek replacement for `ttf2pt1` for extracting font metrics HOT 2
- "Found FontName for 0 fonts." on 64-bit Windows OS
- Type1 importing not working
- Can´t load dinpro light
- Font embedding not working due to GhostScript `-I` switch
- Font is embeded, but i can not document properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extrafont.