vercel / satori

Enlightened library to convert HTML and CSS to SVG

Home Page:https://og-playground.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to keep font-family case-sensitive

TimoWilhelm opened this issue · comments

Feature Request

Description

Satori seems to normalize all font names to lowercase which works great with most rendering engines.

I'm trying to use satori with svg2pdf to generate PDF files. I cannot embed the font as path to keep the PDF text selectable.
The issue is that it uses the fontdb library interally and unfortunately the fonts are not matched case-insensitive (RazrFalcon/fontdb#42).

Right now I need to add a step to go over the generated svg again and replace the font-family names with the original names.
It would be great to have an option to keep the casing for font-families intact.