tomusborne / generateblocks

GenerateBlocks is a small collection of lightweight WordPress blocks that can accomplish nearly anything.
https://generateblocks.com
195 stars 19 forks source link

Improve font-family selection #961

Closed JeanPaiva closed 1 year ago

JeanPaiva commented 1 year ago

Description

We need to improve the font family selection to allow users to search all google fonts, also we need a filter so they can add other fonts.

For GP users, we could show the list of available fonts on the typography system? GP users also might use the filter : generate_typography_default_fonts

eastriverstudio commented 1 year ago

@JeanPaiva +1 please for GP fonts list, I do currently find it a frustration that the fonts I add in the GP typography system don't show in the GB font family list and they have to be typed manaully.

I do tend to set most typography at the theme level for consistency where possible and I'm hopeful both GP and GB will move towards a global variable and fluid based approach to its typography settings, however sometimes you just need to override at the editor level so this suggestion would definitely be a QoL improvement for GP/GB users.

lichtmetzger commented 1 year ago

I would also very much like to have this feature. GP is far behind Elementor and other page builders regarding local fonts. I work for an agency based in the EU and due to the GDPR we are not allowed to use Google Fonts, so I disabled them in the theme and wrote my own custom font manager for uploading .woff/.woff2 fonts (just like Elementor already has).

That works fine in the customizer, because there’s a filter I can hook into and only show the fonts from my font manager in there.

But without a filter for blocks we cannot get rid of the Google Fonts in there and only show our custom ones. It’s like we’re halfway there, but only halfway, which is pretty disappointing.

tomusborne commented 1 year ago

We've added a new filter that will be available in GB 1.8: https://github.com/tomusborne/generateblocks/pull/1010

We can now filter the fonts that appear in the list. This will allow GP to add its fonts from the Font Manage to the list as well.

Thanks!