by lazyjeff · 4y ago · 0 comments
https://oreillymedia.github.io/Using_SVG/extras/ch07-dataURI....
Source: I just dealt with this problem a few weeks ago. I also spent all last week implementing a custom OG image in Canvas. Wish Satori had come out a week earlier!
EDIT: here's how I'm doing the embedding
<style type="text/css">
@font-face { font-family:FontName; src:url(data:font/otf;base64,T1RUTwAOAIAAAwBgQ0ZGIHKc...AAAAAAAAAAAA=) format("opentype"); }
</style>
I've passed by the Chrome SVG code a bit, and I've never seen anything to suggest there's an "SVG lite" type version in there. I imagine it's just painted to a bitmap and handed to the compositor like everything else (obviously a massive simplification).Of course they support embedding too, so you can use any font (and I think embedding is required to be conformant with Pdf-a - but I’m a little hazy on that).