[wp-trac] [WordPress Trac] #59165: Font Face: Server-side @font-face styles generator and printer
WordPress Trac
noreply at wordpress.org
Tue Aug 22 22:14:46 UTC 2023
#59165: Font Face: Server-side @font-face styles generator and printer
-------------------------------------------------+-------------------------
Reporter: hellofromTonya | Owner:
| hellofromTonya
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.4
Component: General | Version:
Severity: normal | Resolution:
Keywords: gutenberg-merge needs-dev-note has- | Focuses:
patch has-unit-tests has-testing-info |
-------------------------------------------------+-------------------------
Comment (by hellofromTonya):
== Scenario 2: Classic Site Testing Instructions
These steps define how to test this enhancement, and indicates the
expected behavior or results.
This scenario tests a classic site with a plugin that passes its array of
fonts to `wp_print_font_faces()`.
=== Steps to Test
1. Install and activate the [https://github.com/hellofromtonya/font-face-
tester Font Face Tester plugin].
2. Activate the Twenty Twenty-One (TT1) theme.
3. In the HTML / Elements tab of your browser's dev tools, search for "wp-
fonts-local" element. See below for the expectations.
=== Expected Results
Here is the list of expectations for each testing step above. This is what
should happen for each of these steps:
- ✅ At Step 3, the `<style id="wp-fonts-local">` element should be in the
main document's `head`, i.e. `head > style#wp-fonts-local`.
- ✅ At Step 3, the `<style id="wp-fonts-local">` element should contain
the following CSS:
{{{
<style id="wp-fonts-local">
@font-face{font-family:"Playfair Display";font-style:normal;font-
weight:200 900;font-display:fallback;src:url('http://localhost:8889/wp-
content/plugins/font-face-tester/assets/fonts/PlayfairDisplay-
VariableFont_wght.ttf') format('truetype');}
@font-face{font-family:"Playfair Display";font-style:italic;font-
weight:200 900;font-display:fallback;src:url('http://localhost:8889/wp-
content/plugins/font-face-tester/assets/fonts/PlayfairDisplay-Italic-
VariableFont_wght.ttf') format('truetype');}
</style>
}}}
**Test Report Icons:**
✅ <= Behavior is ''expected''.
❌ <= Behavior is ''NOT expected''.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59165#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list