[wp-trac] [WordPress Trac] #55985: [Older Twenty-* Themes] Replace directly loading fonts from Google Fonts with including them in each theme

WordPress Trac noreply at wordpress.org
Tue Aug 2 07:43:30 UTC 2022


#55985: [Older Twenty-* Themes] Replace directly loading fonts from Google Fonts
with including them in each theme
---------------------------+----------------------
 Reporter:  luminuu        |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  high           |   Milestone:  6.1
Component:  Bundled Theme  |     Version:
 Severity:  major          |  Resolution:
 Keywords:  has-patch      |     Focuses:  privacy
---------------------------+----------------------

Comment (by luehrsen):

 Just to quickly answer on some of the points raised by @sabernhardt:

 3. The question is if we want to force the network resource to load. From
 personal experience I can say that there are so many different versions of
 fonts available that it can lead to slight differences. So it's a bit
 about priorities: Do we want to consider local files, even if they could
 be from a different font version? Or do we want to ensure consistency and
 always load our defined resources.

 4. Yes, on the surface this might be a simpler solution, but with the
 tradeoff of massive duplication of stylesheets. For consistency (also
 across the themes), readability and based on past implementations I would
 approach this with a strict one font per css file rule. The new functions
 help that, as we keep the old functions consistent in terms of return
 types, if child themes rely on them.

 5. As the Google Fonts repository was one of the main sources for the font
 files, it is also one of the main sources for the attribution for the
 licenses. See https://fonts.google.com/attribution

 7. I opted to not change the filename of the font for better
 maintainability and consistency across projects.

 8. I personally would not deprecate the function, as there might be child
 themes dependent on the existence of the function. It is certainly
 cleaner, but with some of them being 10 years in the field I can't imagine
 what will break inadvertently.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55985#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list