Changelog
Source:NEWS.md
gdtools 0.6.0
CRAN release: 2026-11-13
new features
- The font ‘STIX Two Math’ (version 2.13 b171, SIL Open Font License) is shipped with the package, for the layout of equations: new functions
register_stixmath(), which registers it with ‘systemfonts’, andstixmath_file(), which returns the path of the file. -
strings_sizes()has a new argumentkerning. Withkerning = TRUE, the width includes the kerning stored in the font file (‘kerx’, ‘GPOS’ or ‘kern’ tables), as drawn by devices that kern (ragg, svglite, ggiraph,cairo_pdf()). The tables are read with FreeType, without text shaping and without new dependency. Ligatures and contextual kerning are not applied: see the section “Kerning” of?strings_sizes. The default,kerning = FALSE, keeps the previous values. - New function
font_line_metrics(): the part of a line of text above its baseline, the part below and the distance between the baselines of two lines in single spacing, read from the ‘OS/2’ and ‘hhea’ tables of the font file, with the rule of ‘Microsoft Word’. They depend on the font only, unlike the ascent and descent ofstrings_sizes(), which are those of the ink of a string.
gdtools 0.5.3
CRAN release: 2026-11-05
internals
-
strings_sizes(),str_metrics()andm_str_extents()no longer use Cairo. The metrics are read with FreeType from the font file, without scaling or hinting: the width is the sum of the glyph advances of the ‘hmtx’ table and the ascent and descent are those of the box enclosing the ink of the glyphs. The values are unchanged and only depend on the font file, so the same file gives the same values on every platform. - When the font file found by ‘systemfonts’ cannot be read, a warning is issued and the default sans-serif font is used.
-
str_metrics(NA)now returnsNAmetrics, asstrings_sizes()does, instead of measuring the string"NA". - Cairo is no longer a system requirement: gdtools only needs FreeType (
SystemRequirements: freetype2). On Windows, FreeType comes from Rtools, or from the r-windows bundles for older R versions, as for ‘systemfonts’. -
version_cairo()is deprecated and returnsNULL. -
match_family()is deprecated, usesystemfonts::match_fonts()instead. -
set_dummy_conf(), deprecated since version 0.4.4 and without any effect, is removed. - The minimum version of ‘Rcpp’ is now 0.12.16: version 0.12.12 cannot be installed with R >= 4.0.0 (#58).
gdtools 0.5.2
CRAN release: 2026-10-15
issues
- The list of system fonts is now read once per R session, as reading it is slow when many fonts are installed:
font_family_exists(),sys_fonts(),font_set_liberation()andfont_set_auto()no longer list all the installed fonts on each call (#84). Fonts registered during the session are still found; new functionsys_fonts_reset()refreshes the list after a font is installed on the system. -
m_str_extents()is deprecated, usestrings_sizes()instead. - The unused argument
debugofmatch_family()is removed.
gdtools 0.5.1
CRAN release: 2026-05-25
issues
- font cache helpers now raise an explicit error when the cache directory cannot be created (e.g. unwritable parent), instead of showing a confusing
file.copy()error (#82).
gdtools 0.5.0
CRAN release: 2026-02-09
New features
- New font management API:
font_set(),font_set_liberation(), andfont_set_auto()provide a unified way to configure font aliases, register fonts with ‘systemfonts’, and generate ‘htmlDependency’ objects in a single step. Helper functionsfont_google()andfont_liberation()declare individual font sources.
changes
-
register_liberationsans(),register_liberationserif()andregister_liberationmono()gain anameparameter to register Liberation fonts under a custom family name (e.g."sans","serif","mono"). Default values are unchanged. - remove unused
str_extents(). - remove C++ exported interface as no package uses
LinkingTo: gdtoolsanymore.
issues
- fix face mapping in
strings_sizes(): italic text was incorrectly measured as bold-italic (face 4 instead of face 3). -
strings_sizes()now re-uses Cairo text measurement instead ofsystemfonts::string_metrics_dev(). Callers no longer need a ragg device open for accurate metrics. The measurements are accurate for devices that use Cairo or ‘systemfonts’ (ragg, svglite, ggiraph,cairo_pdf(), …).
gdtools 0.4.4
CRAN release: 2025-10-06
- add tools to use fonts ‘Liberation Serif’ and ‘Liberation Mono’.
- deprecate
set_dummy_conf()that should be removed from the package in a later version. - remove
raster_*functions not used anymore
gdtools 0.4.2
CRAN release: 2025-03-27
- Windows: use cairo from Rtools if available on recent R versions
gdtools 0.3.5
CRAN release: 2023-12-09
New features
-
install_gfont_script()can now directly generate a script file ready to be executed to install a ‘Google Font’, use argumentfile.
gdtools 0.3.3
CRAN release: 2023-03-27
Issues
- no more calls to
gfonts::get_all_fonts(). This should enable usage for those with no access to website used by ‘gfonts’.
gdtools 0.3.2
CRAN release: 2023-03-13
New features
- new function
installed_gfonts()to list installed font from ‘Google’
gdtools 0.3.0
CRAN release: 2023-01-15
New features
- The package now allows to download and work with Google Fonts thanks to the ‘gfonts’ and ‘systemfonts’ package. This is very useful for managing fonts with graphics produced with ‘ragg’, ‘svglite’ and ‘ggiraph’ but also with ‘flextable’ tables. Finally, it is possible to easily embed these fonts in HTML documents.
gdtools 0.2.0
CRAN release: 2019-09-03
- refactor - package is now using package systemfonts instead of using fontconfig to locate fonts file
gdtools 0.1.9
CRAN release: 2019-06-18
- keep locale intact when using various gdtools functions (fix #51)
- Reuse magick FONTCONFIG_PATH if exists
gdtools 0.1.6
CRAN release: 2017-09-01
- update with Rcpp 0.12.12
- new function
glyphs_matchto test whether glyphs in strings are all existing in a font table or not.
gdtools 0.1.5
CRAN release: 2017-08-08
- increase tolerance in font metrics unit-tests as new version of freetype is slightly changing returned extents.
gdtools 0.1.4
CRAN release: 2017-03-17
- New file src/registerDynamicSymbol.c to correctly register provided routines
- a cleanup file to delete src/Makevars when package has been built
gdtools 0.1.3
CRAN release: 2016-11-11
- Add set_dummy_conf() and unset_dummy_conf() to set a minimalistic Fontconfig configuration. Useful to speed up cache building on Appveyor or CRAN.
- skip tests that need fontquiver when not installed.
gdtools 0.1.0
new functions
- sys_fonts: get system fonts details.
- font_family_exists: test if a given font family name can be matched exactly
- match_family: find best family match for a given Fontconfig pattern
- match_font: returns font information for a given Fontconfig pattern
- base64_string_export: encode a string in base64
- version_cairo: runtime version of the Cairo library
- version_freetype: runtime version of the FreeType library
- version_fontconfig: compile-time version of the Fontconfig library
gdtools 0.0.6
CRAN release: 2015-11-25
- Fix to prevent OSX CRAN builder from linking against old libs in /usr/local/lib (Jeroen Ooms)