The fontsize is used to determine the size of text or points in R graphics. But what does it actually represent? For example,
grid::grid.newpage()
grid::grid.points(default.units = "npc",
gp = gpar(fontsize = 100))
Here, the point fontsize is 100. So, I have two questions:
- What does the value mean, the radius, the diameter or the area of a point? Can I find any reference?
- What is the unit of 100? In specific, does it mean 100 pointsize (1 fontsize = 1pt)? Otherwise, is it determined by device-specification? If so, 1 fontsize = ?pt.
Also, I have another question that, in language R, is there any handy functions to convert pt to pixel (px)? For example, we can convert a pt unit to a mm unit as in
convertUnit(unit(1, "pt"), "mm", valueOnly = TRUE)
So, is there any function to query the dimension of the screen and then do the transformation from pt to px?
Thanks!
