🎁 Unwrapping the Sixth of Our Festive Releases: Fonts API in Beta!

:notes: On the 5th day of Developer Christmas, my favorite app development platform gave to me: a new API in Beta :notes:

One of our most popular requests in our new Feature Requests section of our community is access to the Canva Fonts. And we’re excited to be launching that in Beta today!

The Fonts APIs will enable you to open up the native font selection pane for users and gain access to Canva’s font library all without losing your app context. Using Canva’s fonts will allow your users designs to stay consistent even when using an app, so this is an exciting update for all apps that add or edit font!

:writing_hand: requestFontSelection method

Get access to the entire library of Canva fonts to allow your users to choose which font to use with your app. Request Font Selection will take over the entire side panel with the native font selector from Canva. The font selection is then returned as a ref that you can attach when adding Text elements.

:mag_right: findFonts method

Get a list of recommended fonts to be able to create your own custom font flow. Find Fonts will return a list of Canva font references you can use to add to your Text Elements, while allowing you much more flexibility in building your app — for example, to choose fonts completely programmatically, or build a UI more tailored to your needs.

These APIs are currently in Beta, which as a reminder means that Apps using them cannot be submitted for release to the Apps Marketplace. These early releases help us get your feedback on the shape of our APIs, which is extremely valuable to us, so please share any and all comments with the team. The findFonts method is especially early in its design, and we’re keen to have a chat with you if you start building with it on how findFonts can evolve.

We’re all ears :ear: for feedback on this one. Can’t wait to see how you build in fonts for your app!

9 Likes

@Noah_Davey - just wanting to make sure you saw this :slight_smile:

2 Likes

Thanks so much for the tag Elena! Keen for this one :tada:

3 Likes

I was just trying this out, and it’s pretty cool. One thing I noticed is that when selecting a font with requestFontSelection, the ref and previewUrl are always the normal weight, even if the bold version was selected.

I have an app that I’m going to be starting on. But it requires writing text to a canvas element and then being added as an image, rather than adding straight text. It sounds like the Font selection will not work for me because I don’t have access to the font files, only the font ref? Is this correct, and is there any future plans to allow use of canva fonts directly in apps?

I understand that any app using this beta API cannot be submitted for release to the App Marketplace. Does this also mean that we cannot deep link to this app?

Correct - deep linking only works with released apps.

If you want to do some internal testing with your team while an app is in Beta, you could temporarily create a team restricted app for you to use internally, with the understanding that the app could break at any time if there is an update to the API. Released, team-restricted apps can be deeplinked to, but the link will only work for people who are in your Canva Team.

@randombits - sorry, looks like we missed your question earlier. What’s the reason why you need to write text as an image rather than adding text directly? Just wanting to understand use cases for direct access to fonts in a bit more detail.

@Elena_Kelareva I would be creating advanced text effects with image masks. It would be a similar concept to existing “TypeGradient” app but have more advanced effects. I assume that app implemented a custom font picker.