A Web Font API Possibly Coming to WordPress

A Web Font API Possibly Coming to WordPress

Posted by WP Tavern on September 28, 2021 at 5:09 pm
kitty kitty CATegory News
Ari Stathopoulos announced a proposal for implementing a web fonts API in core WordPress. The goal is to standardize how theme authors register and enqueue font styles. It may also serve as the foundation of other features down the road. Jono Alderson opened the original ticket for such an API in February 2019. The discussion has continued off and on since then but has only recently gained momentum. The proposal would allow developers to register fonts from local files or a stylesheet URL like those provided by Google Fonts and other third-party APIs. It would mirror the functions used for loading scripts and styles with WordPress, so developers should transition without much of a learning curve. However, some parameters are different and account for the broader feature range necessary to support web fonts. Loading web fonts is nothing new for theme authors. There are multiple methods to use, depending on whether the files are local or served by a third-party API. However, WordPress has never offered a solution, the closest thing to a standard being copying and pasting what the Twenty* themes were doing. However, various projects have popped up over the years for handling a feature that many theme…

…Full post on WP Tavern
Read Full

Similar Posts

Leave a Reply