Determine if a font has a glyph
Closed this issue · 4 comments
hadley commented
or if the operating system will substitute a glyph from another font
davidgohel commented
can this wait? I am just starting holidays 😎
hadley commented
No rush. Enjoy your holdiays!
davidgohel commented
@hadley what are you expecting as input and output? For now, I have the following but not sure this is what you need.
> has_glyph( c( "\u265E", letters, "valid", "invalid \u265E"), bold = TRUE, italic = FALSE, fontname = "sans")
[1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[15] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[29] FALSE
hadley commented
Yes, that's perfect.