华夫饼干Windows字体数据库中找不到字体系列 [英] Waffle & font family not found in Windows font database

查看:737
本文介绍了华夫饼干Windows字体数据库中找不到字体系列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使以下代码正常工作,以便它将华夫饼图内的字形medkit或FontAwesome字体中的其他任何图标显示出来.

I am trying to get the folowing code to work so that it will display the glyph medkit or any other icons from the FontAwesome font inside my waffle plot.

library(waffle)
library(extrafont)

font_import()


loadfonts(device = "postscript")

它确实显示使用postscriptFonts()在Font R中注册字体:FontAwesome

which does display Registering font with R using postscriptFonts(): FontAwesome

parts <- c(`Un-breached\nUS Population`=(318-11-79), `Premera`=11, `Anthem`=79)

waffle(parts/10, rows=3, colors=c("#969696", "#1879bf", "#009bda"),
   use_glyph="medkit", size=8)

当我运行华夫饼时,出现以下错误:

When I run waffle I get the following errors:

警告消息:

1: Removed 3 rows containing missing values (geom_text).

2: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y,  :
font family not found in Windows font database

我只得到一个绘图,其中的框缺少其中的图标.在我安装fontawesome或在RStudio中工作时,我缺少什么?

I just get a plot with boxes missing the icon inside them. What am I missing in my install of fontawesome or in my work inside RStudio?

推荐答案

所以经典的方法是将其拔出并重新插入,然后重新工作....我重新启动了RStudio,现在它可以工作了.

So the classic have you unplugged it and plugged it back in approach worked...I restarted RStudio and now it works.

这篇关于华夫饼干Windows字体数据库中找不到字体系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆