Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No fonts found #3

Open
tauinger-de opened this issue Feb 19, 2019 · 3 comments
Open

No fonts found #3

tauinger-de opened this issue Feb 19, 2019 · 3 comments

Comments

@tauinger-de
Copy link

Hi,

thanks for providing this promising tool, however I can't get any benefit when running it with the following dummy SVG ("Found 0 fonts to be embedded."):

<svg width="800" height="450" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <text x="400" y="200" font-size="66" text-anchor="middle"
          font-family="Roboto-Light">
        Blahblahblah 00' 12'
    </text>
</svg>

Am I missing something? Typo?

@BTBurke
Copy link
Owner

BTBurke commented Feb 19, 2019

It's likely because it's a contrived example. I believe most tools like Inkscape and Adobe Illustrator use a more CSS-style font-family declaration in a style tag like:

<svg viewBox="0 0 240 80" xmlns="http://www.w3.org/2000/svg">
  <style>
    .small { font: italic 13px sans-serif; font-family: Roboto-Light}
  </style>
  <text x="20" y="35" class="small">My</text>
</svg>

It's looking for that font-family: declaration. It won't find font-family=. That could be updated, but I'm not sure any software packages use that notation in the wild.

@jsettlem
Copy link

I can confirm that PowerPoint makes svgs with "font-family=". It also uses capital ".SVG" for the extension which this script dislikes.

@skylarmt
Copy link

skylarmt commented Jul 5, 2021

Inkscape does this too when exporting optimized SVGs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants