Skip to main content

Why does the font_face property include a ":::custom" suffix for custom fonts in my plugin?

Bubble uses a Google Webfonts library that appends :::custom to the font name for non-Google fonts. This suffix appears when you access the font_face property in plugin code.

Written by Sofia Maconi

Bubble uses a Google Webfonts library to preload fonts. For fonts loaded from a custom source (rather than Google Fonts), the library appends :::custom to the font name as part of its internal format. This suffix appears when you access the font_face property in plugin code.

What you might notice

  • Accessing the font_face property for a custom font in your plugin returns the font name with :::custom appended (e.g. "MyFont:::custom")

  • Google Fonts don't exhibit this behaviour — only fonts loaded from a custom source

Workaround

In your plugin code, strip the :::custom suffix from the font_face value when you need just the font name. You can read more about how the font_face property works in the plugin documentation.

Did this answer your question?