[wp-trac] [WordPress Trac] #43898: Google Font Builder (code written)

WordPress Trac noreply at wordpress.org
Sat May 12 10:06:37 UTC 2018


#43898: Google Font Builder (code written)
-------------------------------------+-------------------------
 Reporter:  alicewondermiscreations  |       Owner:  (none)
     Type:  feature request          |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:  maybelater
 Keywords:                           |     Focuses:
-------------------------------------+-------------------------

Comment (by alicewondermiscreations):

 A feature existing in core does not mean it has to be used. As far as
 other services, that's actually why I built it. I personally am not a fan
 of Google Fonts because of the humongous potential for tracking.

 With this class, the blogmaster can change the font server to any font
 server that has a Google Fonts compatible API - or even run their own with
 commercial fonts. I actually have code for such a font server under a MIT
 license on Github and am using it myself.

 It allows definition of an alternate to Google Fonts in the wp-config.php
 file so that any theme who uses this class (or something like it) doesn't
 need to do anything special for users to use alternate font servers, as
 long as they are Google API compatible.

 And since it is a class, it would be easy to extend it to build font
 strings for font servers that use a different API.

 With respect to minimum version of PHP, I am very sorry but I am what you
 would classify as financially poor. I simply can not afford the hardware
 needed to adequately test on a wide variety of versions of PHP. That's why
 I try to develop for the versions currently supported by upstream PHP -
 and 5.6 is end of life there with only security patches, I suspect they
 will stop supporting it when 7.3.0 is initially released.

 But of course if this was to get into core, parts of the code (and the
 coding style - WordPress clearly has not adopted PSR-2) would have to be
 ported to whatever versions of PHP are intended to be supported by the
 version of PHP it makes it into.

 The class is more of a proof of concept showing it isn't hard to do.
 Usually only the functions.php file of a theme needs to be modified for
 the theme to be 100% compatible.

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


More information about the wp-trac mailing list