davidgohel/gdtools

Determine if a font has a glyph

Closed this issue · 4 comments

or if the operating system will substitute a glyph from another font

can this wait? I am just starting holidays 😎

No rush. Enjoy your holdiays!

@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 

Yes, that's perfect.