profile
viewpoint

Ask questionsFont Picker: Final implementation w/ inline font previews

As an editor I want to be able to preview fonts in the font picker

Acceptance Criteria

  1. Fonts are previewed in the font picker dropdown
  2. UX: If SVG can be used, use Roboto (16px) as a reference for height. (Can bump to 18 px if 16 is too small)

See #30

Design

google/web-stories-wp

Answer questions pbakaus

You can use https://developers.google.com/fonts/docs/getting_started#optimizing_your_font_requests to get fonts subsetted to only the characters you need, and https://developers.google.com/fonts/docs/developer_api to get a list of the public library :)

thanks @davelab6! These are very helpful, and we're already using both :) Our concrete questions is more around how to render a preview of all fonts in a way that isn't super slow to load or crashes the browser...we have a few options:

  1. convert font name previews to actual images (to not have to load fonts)
  2. load all multi hundred subsetted fonts (might crash browser?? IDK)
  3. convert subsetted fonts to svgs and use those (similar to 1)

Any thoughts on that?

useful!

Related questions

No questions were found.
Github User Rank List