gdtools provides functionalities to get font metrics and to generate base64 encoded string from raster matrix. It is used by package
rvg to allow font metric calculation but can also be used to compute the exact size a text would have with specific font options (size, bold, italic).
Another set of functions is provided to support the collection of fonts from ‘Google Fonts’ in a cache. Their use is simple within ‘R Markdown’ documents and ‘shiny’ applications but also with graphic productions generated with the ‘ggiraph’, ‘ragg’ and ‘svglite’ packages or with tabular productions from the ‘flextable’ package.
You can install the released version of gdtools from CRAN with:
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("davidgohel/gdtools")