[Change] Font property has been split into Font and Font Weight

Hello everyone! In preparation for some exciting changes we are making down the pipeline, we have decided to split the font property into two separate properties:

  • Font: contains the selection for the family that you want the element to pull from. Just like before, this will contain all of the google fonts by default, but also any custom fonts you install. However, now it won’t have all the variations as well, just the family.
  • Font weight: contains a dropdown of all weights 100-900. Sets the weight of the selected family Not all fonts support all weights. Setting a text to bold overrides this value (as normal). Doesn’t work for custom fonts at the moment (since we don’t support uploading a set of weights with a custom font at the moment).

Everything should smoothly transition on previous apps, as all previous selections of font will now be split into family and weight.

Happy Bubbling!


Thanks, @cal. Does this impact the plug-in API in any way?

Good question. Plugin elements that expose a font will have the same changes, but for now, we are converting the property back to font_face that we pass into plugins. Soon we’ll probably release a new plugin API version to change this into font_family and font_weight that get passed in instead, but we didn’t want to break any existing plugins.

Ok, thanks. In one plugin, I’m currently parsing things out thusly…

let font_parts = bubble.font_face().split( ':::' ),
    font_family = font_parts[ 0 ],
    font_weight = parseInt( font_parts[ 1 ] )

This has been working fine, so just wanted to make sure nothing would break.

It did it for one of my plugins. Users have to specify a font that is used inside the plugin, but when the update about fonts occurred a few minutes ago, the font was switched to Lato

1 Like

Thanks for the heads-up. I guess I’ll have to take a close look at my plugin over the weekend.

Hi @weswas,

Sorry about that - there was a small issue with the migration process for plugin elements. Any pages that were loaded in the editor may have had their plugin elements reset to Lato, but any live pages should still be fine and any pages which are migrated from now on should be good. Sorry for any inconvenience.

1 Like

Hopefully these are some more styling properties, and conditionals. Would be really cool to conditionally change the font weight and have it be part of a style. Could really start making responsive styles.

And would be also cooler if you add a transition to this changes!
Hope we will see more style transitions available also!

Hi @cal
this new feature is interesting, but could be better if the font and weigth properties can also be filled dynamically (like bg color). Thanks

1 Like

Hi @cal - it seems to be buggy. In the editor, when I select a heavier weight, I then can’t select a lighter weight, or rather I can, but the text doesn’t change. When it runs, the debug inspector indicates it’s the lighter weight but visually, it’s the heavier weight.