[wp-trac] [WordPress Trac] #63568: WP_Font_Face: Font names that contain single quotes are not wrapped in double quotes
WordPress Trac
noreply at wordpress.org
Fri Jun 20 14:36:02 UTC 2025
#63568: WP_Font_Face: Font names that contain single quotes are not wrapped in
double quotes
-------------------------------------------------+-------------------------
Reporter: wildworks | Owner: audrasjb
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.9
Component: Editor | Version: 6.4
Severity: normal | Resolution:
Keywords: has-patch has-test-info has- | Focuses: ui
screenshots |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: has-patch has-test-info has-screenshots reporter-feedback =>
has-patch has-test-info has-screenshots
Comment:
== Test Report
=== Description
✅ This report validates that the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-
develop/pull/8982.diff
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.0
=== Testing Instructions
1. Loading the font [https://core.trac.wordpress.org/raw-
attachment/ticket/63568/O-Reilly-Sans-Regular.ttf proposed here], as
commented in OP instructions
2. Set the font as default Text font
3. Go to the front end and check the code. Look for the name of the font.
In this case, "Reilly Sans". You might spot it in two places: in the local
fonts, and in the CSS vars (check supplemental artifacts)
4. The CSS var is correctly set with double quotes
5. 🐞 The local font lacks of the double quotes
=== Expected Results
- Ideally, the local fonts should also display the font within double
quotes
=== Actual Results
1. ✅ With the patch the font is displayed with double quotes, check
supplemental artifacts.
=== Additional Notes
Replying to [comment:28 siliconforks]:
> Replying to [comment:27 wildworks]:
> > However, it is true that disappearing font files make it difficult to
test this patch accurately.
>
> I believe `npm run build:dev` is the same thing as `npm run dev` but
without running the file watcher? So it should be possible to use that as
a workaround to avoid running into #63605.
>
> There's also `npm run build` which gives you a production build (in the
`build/` directory) instead of a development build (again without running
the file watcher).
Let me recap
The problem here is that originally, the font was not being shown to
@wildworks. This was because the font was disappearing and not correctly
set with double quotes, 50/50.
Then I checked the bug, and it was working for me (I always run `npm run
build:dev` because I rarely work with JS files live), so the font was
showing for me for some reason.
But now I see that with the patch, the font displays consistently both in
the front end and in the back end (when it's not deleted!). This was my
confusion. And as @wildworks suggested, this patch adds a degree of
correctness.
✅ So I think that this patch is safe to ship
=== Supplemental Artifacts
==== Global Styles
[[Image(https://i.imgur.com/nZUl5ju.png)]]
==== Fonts Local Before patch
[[Image(https://i.imgur.com/TLTU3Fj.png)]]
==== Fonts Local After patch
[[Image(https://i.imgur.com/28P0XZP.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63568#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list