Git Product home page Git Product logo

Comments (10)

LaurenzV avatar LaurenzV commented on August 10, 2024 1

We probably should add some kind of command that shows all of the fonts that svg2pdf can find.

from svg2pdf.

LaurenzV avatar LaurenzV commented on August 10, 2024

I mean the font you are seeing is in fact the same as in the reference picture (Dharma Gothic E), the only problem seems to be that for some reason it chooses the italic version of the font instead of the regular one. I can reproduce this on my system if I add the italic font to my system fonts as well, but if I only add the regular one I get the same result as in the reference picture. Not sure what is happening here, will try to investigate.

from svg2pdf.

rgreinho avatar rgreinho commented on August 10, 2024

True, in this case it is the same font in italic, but in the flyer it is a completely different one:

It renders like this:

image

While it should be like that:

image

from svg2pdf.

lalver1 avatar lalver1 commented on August 10, 2024

I have the same issue on Ubuntu 22.04.3 LTS. The font is installed correctly:
Dharma
But the generated pdf renders the text that is supposed to be Dharma Gothic E with a different font. Also, the pdf's properties only show the following fonts being used:

  • Montserrat-Medium
  • Montserrat-SemiBold
  • Montserrat-ExtraLight
  • Montserrat-Bold

But I guess I should see one more font listed (the one used to render "Canberra", the numbers, etc.).

from svg2pdf.

rgreinho avatar rgreinho commented on August 10, 2024

In case that helps to remove potential setup problems, the python tool cairosvg, converts the svg file to PDF with the right fonts.

from svg2pdf.

rgreinho avatar rgreinho commented on August 10, 2024

We probably should add some kind of command that shows all of the fonts that svg2pdf can find.

I took a quick stab at it. PR #45 takes care of it.

from svg2pdf.

rgreinho avatar rgreinho commented on August 10, 2024

@LaurenzV Now that #45 got merged, how can we proceed to work on this issue? What type of info or help would you need from me?

from svg2pdf.

LaurenzV avatar LaurenzV commented on August 10, 2024

You could probably try to render your SVG using resvg (which is the underlying library we use for conversion, including for the text). If doesn't work correctly there either, it's probably an upstream issue. If it works there but not with svg2pdf, then I'll try to investigate what we're doing wrong.

from svg2pdf.

rgreinho avatar rgreinho commented on August 10, 2024

@LaurenzV I did find out that the problem was happening with ReSVG too, so I reported the issue upstream as well: RazrFalcon/resvg#702

from svg2pdf.

LaurenzV avatar LaurenzV commented on August 10, 2024

This has already been fixed upstream IIRC. And I also created a new issue for font fallback (#65), so I'm closing this.

from svg2pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.