-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webfonts: Consider renaming "webfont" to "web font" or "font" #42868
Comments
This seems sensible + clearer. |
@jonoalderson any preference of which name to adopt? "web font" or "font"? |
Font! |
+1 for |
Thanks for creating a new issue for this!
I disagree with these points above. While it is possible that a font may be installed on a user's machine, in most situations that's very unlikely to be the case, and not the true intention of this API. Even if the vision is to create a font library-esque feature, the heart of the API would still be based on web fonts and not local fonts. The only way I would agree with the second point is if the API looked at a user's machine and registered all of the installed fonts. But that seems overkill to me, and likely to produce inconsistent behavior since this will vary wildly user to user. There will also need to be font files that the site owner actually has the rights and proper licensing to use for users without the same system fonts. Refocusing on the decision at hand, I don't strongly disagree with using "font", but I am bit torn and my personal preference is to use "web font". I'll try not to bike shed too much, but here is an outline of my thought process. Even if the decision is to use "font" for class and function names, I'd still advocate for the API to be called the "Web Font API" and all of the documentation should use "web font" to be clear about what is happening. This does make the function names feel "wrong" and out of place. Classes and functions should be self documenting, and this would not be the case. |
My vote is for |
I'll admit that my eyes like the optimization of dropping "web" as redundant, but this is counter to the tradition of referring to fonts used on web sites as "web fonts". It's also notable that licensing from font providers/foundries make clear delineation between licenses intended for "desktop", "server", or "web" use. IMHO it seems clearer to keep both words: "web font". This would be consistent with prior use, and perhaps help steer users/extenders away from unintentional license abuse. |
'Fonts' please. Although there are valid legal and practical arguments for being specific, we rarely make such distinctions elsewhere in life. Music is music, books are books, and colour is colour, regardless of medium, provider or context. |
My vote is for |
+1 for Font |
The heart of the API is to generate valid Looking at Authority Sites to helpLet's take a look at W3C CSS Fonts specifications to see if there's any guidance to help with the naming decision.
What about mdn web docs?
What's your point, Tonya?IMO The API's name should reflect its vision and purpose. Thus, its name likely depends upon the answers to these questions:
And then these for further thinking:
|
It should ultimately provide an abstraction framework for doing anything with fonts; regardless of the surface they're output to / designed for. Therefore, 'font' rather than 'web font'. |
I'm throwing one more at us to consider 🤣 The result of the API is to generate |
It might theoretically do other things / enqueue fonts in other ways in the future, I reckon? In which case, it's still a "fonts API", and the fact that that manifests as a |
That's true. It's an API. It will likely evolve over time to support the needs of the Font Library, users, and developers. And I like what you @jonoalderson said here as this is why it's needed and what it does:
|
The votes so far are:
@desrosj you had objections to calling it "Fonts API". What do you think today with the recent discussions? Would you be okay with it being more generically called the "Fonts API"? |
PR #46749 renames the API to "Fonts API". It also deprecates the original |
Coming from print & digital design background, designers have also used "web font" to distinguish from "print fonts"; fonts optimized separately for screen use vs printing on paper. I haven't been in touch with print design for many years anymore, but it seems like distinction and terminology has been slowly going away in design, with newer fonts more often being optimized for both screen and print use simultaneously. Some further reading; https://creativepro.com/print-vs-web-fonts-what-s-the-difference/ Separate web/print optimization and licensing aspects are still often mentioned when describing the font (see e.g. Open Sans on Google Fonts). Anyway, I also think simpler naming (just Fonts) is helpful and results to more readable class and function names. It also doesn't leave anyone guessing what "web" in APIs context actually means. |
I'm inclined to use |
Y'all can bikeshed all you want on what we call things here, with the exception of something user-facing within the editor in which case I strongly advocate for |
Alrighty thank you everyone for weighing in on the renaming. The API will be renamed to |
Part of #41479.
Problem Statement
The terms
webfonts
andwebfont
are misaligned to terminology of well-known authoritative standards.As suggested by @desrosj, this proposal is to consider renaming web font terminology from "webfont" to "web font". In addition, I've expanded this proposal to consider dropping the word "web" and renaming to "font".
Why rename?
The renaming is to align the feature to well-known authoritative standards for consistency and maintainability.
As @desrosj noted, "I know this is a nit, but I think it's important to get it right and be consistent."
As shown below, industry standard refers to a font as "web font" when its font file is served from a web server to the browser. Though technically the API itself is for fonts, meaning web fonts and/or locally installed fonts via
local()
.Current Choices
Proposal 1: Rename to Web Font
Fonts hosted on a web server are primarily called "web fonts".
This rename would result in the following class and function name changes:
WP_Web_Fonts
WP_Webfonts_Provider_Local
WP_Web_Fonts_Provider_Local
WP_Webfonts_Provider
WP_Web_Fonts_Provider
wp_webfonts()
wp_web_fonts()
wp_register_webfonts()
wp_register_web_fonts()
wp_register_webfont()
wp_register_web_font()
wp_enqueue_webfonts()
wp_enqueue_web_fonts()
wp_enqueue_webfont()
wp_enqueue_web_font()
wp_register_webfont_provider()
wp_register_web_font_provider()
wp_get_webfont_providers()
wp_get_web_font_providers()
as well as all references within code comments.
Proposal 2: Rename to Font
The API itself supports the vision of a font library and management. One part of its functionality is to dynamically generate the
@font-face
ruleset.What is
@font-face
? Per MDN web docs:If "web font" means a font file obtained from a web server, then the API's generation of
@font-face
deals with both web and locally installed fonts (on the user's computer or mobile device).To be technically accurate, the API then is not limited to only web fonts (font files downloaded to the browser from a web server). Rather it supports "fonts" and the bigger vision of a font library and font management.
This rename would result in the following class and function name changes:
WP_Webfonts
WP_Fonts
WP_Webfonts_Provider_Local
WP_Fonts_Provider_Local
WP_Webfonts_Provider
WP_Fonts_Provider
wp_webfonts()
wp_fonts()
wp_register_webfonts()
wp_register_fonts()
wp_register_webfont()
wp_register_font()
wp_enqueue_webfonts()
wp_enqueue_fonts()
wp_enqueue_webfont()
wp_enqueue_font()
wp_register_webfont_provider()
wp_register_font_provider()
wp_get_webfont_providers()
wp_get_font_providers()
as well as all references within code comments.
The text was updated successfully, but these errors were encountered: