Open SverreStausland opened 11 years ago
I have the same issue using "Arial" with R3.4.4, extrafont 0.17 and extrafontdb 1.0 on a Win10 machine.
My devtools::session_info()
is as follows:
Session info ------------------------------------------------------------------------------------------------------
setting value
version R version 3.4.4 (2018-03-15)
system x86_64, mingw32
ui RStudio (1.1.423)
language (EN)
collate Dutch_Belgium.1252
tz Europe/Paris
date 2018-05-21
Packages ----------------------------------------------------------------------------------------------------------
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.4.1)
base * 3.4.4 2018-03-15 local
bindr 0.1.1 2018-03-13 CRAN (R 3.4.4)
bindrcpp 0.2.2 2018-03-29 CRAN (R 3.4.4)
cellranger 1.1.0 2016-07-27 CRAN (R 3.4.1)
compiler 3.4.4 2018-03-15 local
datasets * 3.4.4 2018-03-15 local
devtools 1.13.5 2018-02-18 CRAN (R 3.4.3)
digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
dplyr * 0.7.5 2018-05-19 CRAN (R 3.4.4)
extrafont * 0.17 2014-12-08 CRAN (R 3.4.0)
extrafontdb 1.0 2012-06-11 CRAN (R 3.4.0)
glue 1.2.0 2017-10-29 CRAN (R 3.4.2)
graphics * 3.4.4 2018-03-15 local
grDevices * 3.4.4 2018-03-15 local
grofit * 1.1.1-1 2014-10-06 CRAN (R 3.4.0)
magrittr 1.5 2014-11-22 CRAN (R 3.4.1)
memoise 1.1.0 2017-04-21 CRAN (R 3.4.1)
methods * 3.4.4 2018-03-15 local
minpack.lm * 1.2-1 2016-11-20 CRAN (R 3.4.3)
pillar 1.2.2 2018-04-26 CRAN (R 3.4.4)
pkgconfig 2.0.1 2017-03-21 CRAN (R 3.4.1)
purrr 0.2.4 2017-10-18 CRAN (R 3.4.4)
R6 2.2.2 2017-06-17 CRAN (R 3.4.1)
Rcpp 0.12.17 2018-05-18 CRAN (R 3.4.4)
readxl * 1.1.0 2018-04-20 CRAN (R 3.4.4)
rlang 0.2.0 2018-02-20 CRAN (R 3.4.3)
Rttf2pt1 1.3.6 2018-02-22 CRAN (R 3.4.3)
stats * 3.4.4 2018-03-15 local
tibble 1.4.2 2018-01-22 CRAN (R 3.4.3)
tidyr * 0.8.1 2018-05-18 CRAN (R 3.4.4)
tidyselect 0.2.4 2018-02-26 CRAN (R 3.4.4)
tools 3.4.4 2018-03-15 local
utils * 3.4.4 2018-03-15 local
withr 2.1.2 2018-03-15 CRAN (R 3.4.4)
yaml 2.1.19 2018-05-01 CRAN (R 3.4.4)
The code called to make extrafont
work was:
extrafont::font_import()
extrafont::loadfonts(device="pdf")
When calling fonts()
and fonttable()
I can verify that I have "Arial" in the list. When calling a pdf device with family="Arial"
I am getting warnings like above:
(...)
1: In strwidth(legend, units = "user", cex = cex, font = text.font) :
font width unknown for character 0x74
2: In strwidth(legend, units = "user", cex = cex, font = text.font) :
font width unknown for character 0x65
3: In strwidth(legend, units = "user", cex = cex, font = text.font) :
font width unknown for character 0x73
4: In strwidth(legend, units = "user", cex = cex, font = text.font) :
font width unknown for character 0x74
(...)
I was having the same issue, but using
ggsave(device = cairo_pdf...
fixed it (previously I was calling cairo_pdf(), which did printed to PDF but had overlapping titles like users above).
Thanks MichelineCampbell! That worked for me!
I was having the same issue, but using
ggsave(device = cairo_pdf...
fixed it (previously I was calling cairo_pdf(), which did printed to PDF but had overlapping titles like users above).
I have beening trying to solve this overlapping problem all day. Thanks a lot!
My code:
Console output:
The output: