Git Product home page Git Product logo

Comments (11)

cam-ball avatar cam-ball commented on June 28, 2024

I'm also having issues with OTF fonts. In my case, I'm loading a Noto font as a fallback_font, and the characters missing from my base font simply render as whitespace when trying to use the OTF

OTF (with whitespace highlighted)
Screenshot 2023-06-14 at 9 41 05 AM

TTF
Screenshot 2023-06-14 at 9 41 33 AM

    pdf-core (0.9.0)
    prawn (2.4.0)
      pdf-core (~> 0.9.0)
      ttfunk (~> 1.7)
    ttfunk (1.7.0)

from prawn.

leonvogt avatar leonvogt commented on June 28, 2024

I'm also having issues with OTF fonts. At least on windows machines, on the mac it worked for me.
My workaround was to convert the OTF fonts to TTF.
With TTF fonts the problem disappeared.

from prawn.

pointlessone avatar pointlessone commented on June 28, 2024

@leonvogt Do you experience the issue with git versions of TTFunk and Prawn?

from prawn.

leonvogt avatar leonvogt commented on June 28, 2024

@pointlessone I'm not quite sure I understand your question.
I'm using the released versions on rubygems.org and not the main/master branches, if that's what you mean.
I'm using the following versions:

prawn (2.4.0)
  pdf-core (~> 0.9.0)
  ttfunk (~> 1.7)

from prawn.

pointlessone avatar pointlessone commented on June 28, 2024

@leonvogt Yeah, that's what I mean. It was a while since last release and a few bugs have been fixed since. Could you please try master and let me know if your issue has been fixed or not?

from prawn.

leonvogt avatar leonvogt commented on June 28, 2024

I quickly tested with the current version in the master branch, sadly the problem still exists.
Even worse, with the current version it also incorrectly renders the OTF fonts on the macOS system (14.2.1).

image

Used font: Gilroy
Same font with TTF files are no problem and will get rendered fine.

from prawn.

pointlessone avatar pointlessone commented on June 28, 2024

@leonvogt Could you please provide a minimal script that demonstrates the issue, list versions/commit hashes for prawn, pdf-core, and ttfunk gems, and link to the exact font?

from prawn.

leonvogt avatar leonvogt commented on June 28, 2024

@pointlessone sure, I'll try to create a minimal setup in the coming days.

from prawn.

leonvogt avatar leonvogt commented on June 28, 2024

@pointlessone while creating the sample repository I noticed that the most issues are resolved with the current master branch. In my previous comment I mentioned that the issue is still present in the current master branch. Thing is, I only used the current prawn master branch and not the current pdf-core master branch or ttfunk master branch.
So most things are working now for me.
One problem I still encountered is that Umlaute are not displayed correctly with .otf fonts.
Here a sample repository: https://github.com/leonvogt/prawn-otf-font-issue
One thing to mention: I didn't test different fonts. I only tested the mentioned Gilroy font.

from prawn.

pointlessone avatar pointlessone commented on June 28, 2024

@leonvogt I think I've fixed the Umlaute issue. Could you please take another look?

from prawn.

pointlessone avatar pointlessone commented on June 28, 2024

I'll assume that everyone's busy but everything's OK.

Please a new issue if you find things are not in order.

from prawn.

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.