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'.

Version: 0.5.0
Depends: R (≥ 4.0.0)
Imports: fontquiver (≥ 0.2.0), htmltools, Rcpp (≥ 0.12.12), systemfonts (≥ 1.3.1), tools
LinkingTo: Rcpp
Suggests: curl, gfonts, methods, testthat
Published: 2026-02-09
DOI: 10.32614/CRAN.package.gdtools
Author: David Gohel [aut, cre], Hadley Wickham [aut], Lionel Henry [aut], Jeroen Ooms ORCID iD [aut], Yixuan Qiu [ctb], R Core Team [cph] (Cairo code from X11 device), ArData [cph], RStudio [cph]
Maintainer: David Gohel <david.gohel at ardata.fr>
BugReports: https://github.com/davidgohel/gdtools/issues
License: GPL-3 | file LICENSE
URL: https://davidgohel.github.io/gdtools/
NeedsCompilation: yes
SystemRequirements: cairo, freetype2, fontconfig
Materials: README, NEWS
CRAN checks: gdtools results

Documentation:

Reference manual: gdtools.html , gdtools.pdf

Downloads:

Package source: gdtools_0.5.0.tar.gz
Windows binaries: r-devel: gdtools_0.4.4.zip, r-release: gdtools_0.4.4.zip, r-oldrel: gdtools_0.4.4.zip
macOS binaries: r-release (arm64): gdtools_0.5.0.tgz, r-oldrel (arm64): gdtools_0.5.0.tgz, r-release (x86_64): gdtools_0.5.0.tgz, r-oldrel (x86_64): gdtools_0.5.0.tgz
Old sources: gdtools archive

Reverse dependencies:

Reverse imports: cardargus, flextable, ggfootball, ggiraph, movedesign, rvg
Reverse suggests: officer, tsmp

Linking:

Please use the canonical form https://CRAN.R-project.org/package=gdtools to link to this page.