gdtools: Font Metrics and Font Management Utilities for R Graphics

Compute text metrics (width, ascent, descent) using 'Cairo' and 'FreeType', independently of the active graphic device. Font lookup is delegated to 'systemfonts'. Additional utilities let users register 'Google Fonts' or bundled 'Liberation' fonts, check font availability, and assemble 'htmlDependency' objects so that fonts are correctly embedded in 'Shiny' applications, 'R Markdown' documents, and 'htmlwidgets' outputs such as 'ggiraph'.

Getting started

Package details

AuthorDavid Gohel [aut, cre], Hadley Wickham [aut], Lionel Henry [aut], Jeroen Ooms [aut] (ORCID: <https://orcid.org/0000-0002-4035-0289>), Yixuan Qiu [ctb], R Core Team [cph] (Cairo code from X11 device), ArData [cph], RStudio [cph]
MaintainerDavid Gohel <david.gohel@ardata.fr>
LicenseGPL-3 | file LICENSE
Version0.5.1
URL https://davidgohel.github.io/gdtools/
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("gdtools")

Try the gdtools package in your browser

Any scripts or data that you put into this service are public.

gdtools documentation built on May 26, 2026, 1:06 a.m.