[Fonts API] Deprecate and remove all functionality (in favor of Font Face) #51819
Labels
[Feature] Typography
Font and typography-related issues and PRs
[Type] Task
Issues or PRs that have been broken down into an individual action to take
Related to #51769.
Part of #41479.
What problem does this address?
The Fonts API will be replaced by the Font Face #51769. But its classes, functions, and public and protected methods must be loaded into memory and be non-functional (no code except deprecations).
Once the Fonts Library is merged, sites currently using the Fonts API will break with fatal errors. Why? The Font Face files get loaded instead of the Fonts API (its replacing it).
What is your proposed solution?
To avoid breaking sites using the Fonts API, all of the classes, public methods, and functions need to be loaded into memory. To avoid font workflow conflicts, the code within these methods and functions will be removed and not work (non-functional), and deprecations added to alert folks to not use the Fonts API.
Once Font Face is merged into `trunk, then:
into
/lib/experimental/fonts/bc-layer/`.private
methods.wp_fonts()
.wp_print_fonts()
./lib/experimental/fonts/bc-layer/
inlib/load.php
, adding them after the Font Face files.IMPORTANT:
In
lib/load.php
, files inlib/experimental/fonts/
(i.e. Font Face and its BC Layer) will only load into memory when the Font Library is merged intotrunk
or when loaded in tests.Else, the Fonts API (in
lib/experimental/fonts-api
) is loaded into memory.It's important to keep these separate and only load either the Fonts API (all files in
lib/experimental/fonts-api/
) OR Font Face (all files inlib/experimental/fonts/
). Do not load bothlib/experimental/fonts-api/
andlib/experimental/fonts/
.The text was updated successfully, but these errors were encountered: