Package: AddFonts 1.0.0

AddFonts: Download and Register Fonts from GDPR-Compliant Providers for Use in R Graphics

Download and register fonts from GDPR-compliant providers for use in R graphics. Supports weight-based providers (e.g. Bunny Fonts, <https://fonts.bunny.net/>) and file-based providers (e.g. Bye Bye Binary, <https://gitlab.com/bye-bye-binary>). Architecture allows for easy additions of font providers.

Authors:Guillaume Noblet [aut, cre, cph]

AddFonts_1.0.0.tar.gz
AddFonts_1.0.0.zip(r-4.7-any)AddFonts_1.0.0.zip(r-4.6-any)AddFonts_1.0.0.zip(r-4.5-any)
AddFonts_1.0.0.tgz(r-4.6-any)AddFonts_1.0.0.tgz(r-4.5-any)
AddFonts_1.0.0.tar.gz(r-4.7-any)AddFonts_1.0.0.tar.gz(r-4.6-any)
AddFonts_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
AddFonts/json (API)

# Install 'AddFonts' in R:
install.packages('AddFonts', repos = c('https://gnoblet.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://codeberg.org/gnoblet/addfonts

On CRAN:

Conda:

2.18 score 7 scripts 8 exports 20 dependencies

Last updated from:e781ad02db. Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR135
source / vignettesOK181
linux-release-x86_64ERROR183
macos-release-arm64ERROR106
macos-oldrel-arm64ERROR95
windows-develERROR134
windows-releaseERROR93
windows-oldrelERROR81
wasm-releaseOK112

Exports:add_fontcache_cleanFontProviderFileFontProviderWeightlist_providerspreview_fontregister_providerunregister_provider

Dependencies:askpassclicurlfsgluehttr2jsonlitelifecyclemagrittropensslR6rappdirsrlangS7showtextshowtextdbsyssysfontsvctrswithr

Readme and manuals

Help Manual

Help pageTopics
Route add_font() for provider = "url" (direct download).add_font_direct_url
Route add_font() for a file-based provider.add_font_file
Route add_font() for provider = "file" (local copies).add_font_local
Route add_font() for a weight-based provider.add_font_weight
Download a URL to a local file via httr2.fetch_url_to_cache
Build a CacheEntry, persist the cache index, and return the entry.persist_cache_entry
Validate a variants list.validate_variants
Add a font to the local cache and register it for useadd_font
Read from listas_CacheEntryList
Construct a FontProvider subclass from a named listas_FontProvider
As listas_list
Clean cache entriescache_clean
Compute canonical cache path for a file-based (symbolic-variant) font filecache_file_path
Get certain families from CacheEntryListcache_get
Check which symbolic variant keys are present in a CacheEntrycache_get_variants
Check which weights are available in a cache entrycache_get_weights
Read cache entry from diskcache_read
Delete entry from cachecache_remove
Set cache entriescache_set
Compose canonical filename for a cached TTFcache_ttf_filename
Compute canonical cache path for a TTF filecache_ttf_path
Compute paths used for caching provider artifacts and any conversion intermediate files.cache_variant_paths
Write CacheEntryList to disk as JSONcache_write
S7-backed cache entry (CacheEntry)CacheEntry
S7 list of cache entries (CacheEntryList)CacheEntryList
S7-backed cache metadata (CacheMeta)CacheMeta
Resolve a conversion name to the converter function used by the package (currently only 'woff2_to_ttf').conv_fun
Copy local font files to cache and create a cache entrycopy_and_cache_local
Copy one local font file into the cachecopy_variant_to_cache
Delete filesdelete_files
Download font variants and add to cachedownload_and_cache
Download all variants of a file-based font and add to cachedownload_and_cache_file
Download direct-URL font variants and add to cachedownload_and_cache_url
Download one font file from a file-based providerdownload_variant_file
Download and (if needed) convert a provider artifact to a local TTF file for a given family/weight/style and return the local path.download_variant_generic
Download font files for specified weightsdownload_weights
Base font provider class (FontProvider)FontProvider
Sentinel provider for direct-URL font downloads (provider = "url")FontProviderDirectURL
File-based font provider (FontProviderFile)FontProviderFile
Sentinel provider for local font files (provider = "file")FontProviderLocal
Weight-based font provider (FontProviderWeight)FontProviderWeight
Get the package cache directory for fontsget_cache_dir
Get provider details from internal dataget_provider_details
List all available font providerslist_providers
Show a provider's first-use message, at most once per sessionmaybe_show_first_use
Preview a font by ensuring it's installed and drawing a sample stringpreview_font
Validate a cache entry and register the font with sysfonts if the required files exist. Returns the prepared 'files' list or 'NULL' when registration cannot proceed.register_from_cache
Register a font provider for the current sessionregister_provider
Create a filesystem-safe id from a namesafe_id
Remove a font provider from the session registryunregister_provider
Download missing weights and update an existing cache entryupdate_download_and_cache
Convert a .woff2 font to .ttf using the system 'woff2_decompress' toolwoff2_to_ttf