Using System Fonts for Emoji Rendering in Skia CanvasKit

47 views
Skip to first unread message

aiz berg

unread,
Oct 16, 2024, 7:17:06 PMOct 16
to skia-discuss

Hi everyone,

I’m working with Skia's CanvasKit and looking for a way to render emojis using system fonts. Specifically, I want to leverage the system’s default emoji font (like Apple Color Emoji on iOS/macOS or Segoe UI Emoji on Windows) rather than embedding a custom font.

Is there a way to configure Skia CanvasKit to use system fonts for emoji rendering, or is it limited to only using fonts that are explicitly loaded? If it’s possible, I’d appreciate any guidance or examples on how to implement it.

Thanks in advance!

kjlu...@google.com

unread,
Oct 16, 2024, 7:19:43 PMOct 16
to skia-discuss
If you are running CanvasKit in the browser, there is no current way (that I am aware of) to get access to system fonts. You need to download all fonts you need and give the data to CK.

If you running CanvasKit via node, there is no built-in way to scan for system fonts. This would need to be done in JS/TS to find the font files, read them, and give the data to CK.

Reply all
Reply to author
Forward
0 new messages