Search code examples
javascriptgoogle-webfonts

Google Webfonts chooser and embedder widget for Javascript


Does there already exist a widget which would allow the user to pick his/her choice from one of Google Webfonts fonts and you could embed this widget to your own web application?

http://www.google.com/webfonts

Some kind of advanced Font picker dialog with robust search and preview functionality, allowing dynamically to load Google Webfonts.

Does Google Webfonts expose the necessary listing and metadata to build such widget if one doesn't exist yet?


Solution

  • i've found one project: https://github.com/agoragames/GWFSelect-for-jQuery-UI

    a few drawbacks i noticed:

    • fouc as you scroll through the list of typefaces
    • seems to download the entire typeface rather than the needed characters
    • depends on jQuery UI

    a nice project though and might do the job. note that if you are trying to use it you will probably need to use your own api key. you can get one from google.

    Does Google Webfonts expose the necessary listing and metadata to build such widget if one doesn't exist yet?

    they have an api which you can use to build such a widget: https://developers.google.com/webfonts/docs/developer_api

    i imagine google docs uses this api for their amazing font chooser.