giocomai / ganttrify

Create beautiful Gantt charts with ggplot2
https://ganttrify.europeandatajournalism.eu/
GNU General Public License v3.0
654 stars 61 forks source link

Set font to one installed by default #21

Closed danmaclean closed 7 months ago

danmaclean commented 2 years ago

Test code failed on my macOS RStudio installation. Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : polygon edge not found . Traced to uninstalled font. Change to installed Arial font fixes issue.

giocomai commented 2 years ago

Thanks for this feedback.

The readme already includes a notice:

[all examples in this page will use the Roboto condensed font; if it is not installed, you can use the default sans. See the Troubleshooting section at the bottom of this readme.]

I will consider making it more prominent.

Also, "Arial" is not available on all operating systems by default (notably, not on Linux).

The default font in the package is already a generic "sans". Since I care about the looks, I also care about the font, which is why I used a custom fonts in the examples. I may well update the package to check for font availability and give an informative warning/error. I opened the relevant issue: https://github.com/giocomai/ganttrify/issues/22

Again, feedback appreciated.

danmaclean commented 2 years ago

Thanks for response, I missed the notice in the README. I think it was likely off screen when I cut and paste the example to test the package. I imagine it's hard to prepare for all user's mistakes! Appreciate your willingness to take account of 'busy' users. This is the best of the gantt chart tools I looked at btw!