An R package that simplifies using system fonts, web fonts, and CJK fonts in R plots across all graphics devices.
showtext is an R package that makes it easy to use various font types in R plots, including system fonts, web fonts, and CJK fonts. It solves the problem where standard R graphics devices struggle with non-standard fonts, particularly for PDF output with special characters. The package works by converting text to graphical elements, ensuring plots appear identical across different systems.
R users creating publication-quality plots who need consistent font rendering across platforms, data scientists working with multilingual data (especially CJK characters), and researchers who want to use specific brand or aesthetic fonts in their visualizations.
Developers choose showtext because it provides a simple, unified solution for font management in R graphics without requiring external dependencies like Ghostscript. Its ability to render fonts consistently across all devices and operating systems, combined with easy Google Fonts integration, makes it superior to basic R font handling.
Using Fonts More Easily in R Graphs
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with TrueType, OpenType, Type 1, and web fonts without requiring Ghostscript, as highlighted in the README's multi-format support, eliminating external dependencies.
Converts text to polygonal outlines or raster images, ensuring plots look identical on all systems regardless of installed fonts, solving PDF font inconsistency issues described in the README.
Directly loads fonts from Google Fonts using font_add_google(), providing quick access to hundreds of free fonts with minimal code, as demonstrated in the quick example.
Includes WenQuanYi Micro Hei and helpers for Adobe Source Han fonts, making CJK character rendering straightforward for multilingual data, per the CJK fonts section.
Converting text to graphics can slow down plot rendering, especially for high-resolution devices or plots with extensive text, as acknowledged in the internals section where it overrides device functions.
Rendered text becomes non-selectable and uneditable in output files since it's treated as images or outlines, limiting use in interactive or accessible contexts.
Requires manual font loading via sysfonts and path management, which can be cumbersome for users with many custom fonts, as shown in the loading fonts section with font_add() and font_files().