Replace extrafont with systemfonts#103
Open
edwardarchaeology wants to merge 2 commits intohrbrmstr:masterfrom
Open
Replace extrafont with systemfonts#103edwardarchaeology wants to merge 2 commits intohrbrmstr:masterfrom
edwardarchaeology wants to merge 2 commits intohrbrmstr:masterfrom
Conversation
- Migrate from archived extrafont to maintained systemfonts - Fix ggplot2 3.4.0+ and systemfonts 1.1.0+ deprecation warnings - Update documentation and improve user guidance - Add Windows-specific font installation instructions - Maintain full backward compatibility
- Migrate from archived extrafont to maintained systemfonts - Fix ggplot2 3.4.0+ and systemfonts 1.1.0+ deprecation warnings - Update documentation and improve user guidance - Add Windows-specific font installation instructions - Maintain full backward compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace extrafont with systemfonts
Summary
This PR migrates the waffle package from the archived
extrafontpackage to the actively maintainedsystemfontspackage, resolving dependency on unmaintained software and fixing compatibility issues with modern ggplot2.Motivation
extrafonthas been archived on CRAN and is no longer maintainedsystemfontsis actively maintained and is the recommended modern approach for font handling in RChanges Made
Core Font Handling
extrafontwithsystemfontsfor all font detection and registrationload_fontawesome()to usesystemfonts::register_font()instead ofextrafont::font_import()extrafont::choose_font()with.has_font()helper usingsystemfonts::match_fonts()Bug Fixes
sizetolinewidthingeom_tile()callsmatch_font()tomatch_fonts()Documentation Updates
extrafontfrom documentation and examplesinstall_fa_fonts()with clear instructions for Windows users.Rddocumentation filesImproved User Experience
Files Modified
DESCRIPTION: Updated dependency from extrafont to systemfonts (version bumped to 1.0.3)NAMESPACE: Updated importsR/waffle-package.R: Updated importsR/font-helpers.R: Created with.has_font()helper using systemfontsR/zzz.R: Rewroteload_fontawesome()for systemfontsR/waffle.R: Updated font checking, fixed deprecations, improved docsR/fontawesome.R: Enhancedinstall_fa_fonts()with detailed instructionsman/install_fa_fonts.Rd: Updated documentationman/waffle.Rd: Updated documentation.gitignore: Added test filesTesting
Known Limitations
On Windows, graphics devices require system-wide font installation for Font Awesome glyphs (same as before, but now with clearer instructions). This is a Windows graphics device limitation, not a systemfonts issue.
Benefits
Backward Compatibility
This change is fully backward compatible:
Additional Notes:
MIGRATION_NOTES.md