Comments (11)
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)
pdf-core (0.9.0)
prawn (2.4.0)
pdf-core (~> 0.9.0)
ttfunk (~> 1.7)
ttfunk (1.7.0)
from prawn.
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.
@leonvogt Do you experience the issue with git versions of TTFunk and Prawn?
from prawn.
@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.
@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.
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).
Used font: Gilroy
Same font with TTF files are no problem and will get rendered fine.
from prawn.
@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.
@pointlessone sure, I'll try to create a minimal setup in the coming days.
from prawn.
@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.
@leonvogt I think I've fixed the Umlaute issue. Could you please take another look?
from prawn.
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)
- Is there a prawn equivalent of z-index for moving elements to front/back?
- text_box with shrink_to_fit sometimes crops end of sentence
- Advanced text layout HOT 2
- 2 test failures after updating rspec to 3.12 HOT 1
- No way to give dynamic-height bounding boxes a background color HOT 1
- Incompatibility with ruby 3.1 HOT 1
- "Cursor" with repeater dynamic not working HOT 3
- Error in the manual? (page 11) HOT 2
- Issue with image colors when converting to PDF HOT 1
- Question about re-using some Prawn code to render appearance streams for AcroForm annotations HOT 2
- Push New Version to Ruby Gems to Deal with Ruby 3.1 Removing Matrix HOT 6
- Setting multi page table top margin
- Does this gem support chartjs?
- PDF/A-1
- PDF/A-3
- Rails 7.X ActionView::Base.full_sanitizer.sanitize(Prawn::Text::NBSP) returns " " HOT 1
- [FR] OpenType Support, Enable/Disable Ligatures and Multiple weight settings HOT 8
- Subtable with colspan and multi-line text breaks across pages
- Grid broken if no gutter defined HOT 5
- TypeError: can't convert nil into Float HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prawn.