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

WordPress Trac noreply at wordpress.org
Sun Apr 29 14:24:01 UTC 2018


#43898: Google Font Builder (code written)
-------------------------------------+-----------------------------
 Reporter:  alicewondermiscreations  |      Owner:  (none)
     Type:  feature request          |     Status:  new
 Priority:  normal                   |  Milestone:  Awaiting Review
Component:  General                  |    Version:
 Severity:  normal                   |   Keywords:
  Focuses:                           |
-------------------------------------+-----------------------------
 Large number of themes use fonts.googleapis.com to generate a style sheet
 for webfonts. As in almost every one I have played with. Many of them make
 mistakes, such as forgetting to request the italic variant of a font which
 results in browser emulation when italics is needed, which often looks
 decent but not as good as it could. All of them hardcode
 fonts.googleapis.com into the theme meaning if (for privacy reasons) a
 blogmaster wants to switch to a mirror that doesn't track, they have to
 edit the theme source - which IMHO should be avoided as much as possible.

 I wrote a class that takes care of all of this while allowing the
 blogmaster to optionally change the default hostname for the google fonts
 URI by setting a define in the wp-config.php.

 https://gist.github.com/AliceWonderMiscreations/b0071e48a27a536142ce38bf6868336b

 I believe it belongs in core because it must be loaded before theme
 developers can make use of it, and WordPress does not have a native way to
 say "Requires plugin X and load plugin X first" so for theme devs to use
 it, they would have to include it in their theme source which potentially
 means many copies installed.

 Thank you for your time and consideration. Class is MIT or GPL2 - really I
 don't care what license it is used with as long as it is OSI approved
 FLOSS license.

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


More information about the wp-trac mailing list