Comments (5)
Looks like the correct way to go in the future:
https://twitter.com/KhaledGhetas/status/1548752758282534913
from satori.
Thanks again for the pointers @devongovett! I actually looked into fontkit before picking opentype.js (because it's smaller, seems like a wrong choice lol), and actually read a lot of your comments from everywhere (thank you again!), and I understand the complexibility of this. Hence the first phase of this project is to support only basic text layout and font features.
Anyways, this is definitely our top priority!
from satori.
You could also try fontkit, which is a pure JS implementation supporting complex scripts. It powers pdfkit.
There's also textkit for handling higher level text layout (eg line wrapping, font substitution, etc.). That's used by react-pdf.
I'd highly recommend looking into some of these libraries and how they do text layout, because it is extremely complicated (especially with non-English text). Back when react-pdf was investigating this, I wrote this comment explaining the whole text layout process - maybe it's helpful to you. foliojs/pdfkit#783 (comment)
from satori.
@shuding how would you workaround the limitations of Harfbuzz, such as line breaking?
from satori.
@shuding how would you workaround the limitations of Harfbuzz, such as line breaking?
Thank you for sharing this!
from satori.
Related Issues (20)
- TextDecoration issue when used with transform property
- `lucide-react` not rendering
- `filter: "blur(...)"` doesn't work as expected with Satori + resvg-js HOT 2
- Image mask causing image to be hidden behind other SVG elements HOT 2
- CDN image not rendering
- Support `font-feature-settings`
- Custom fonts not rendered correctly
- Support -webkit-text-stroke HOT 1
- Option to keep font-family case-sensitive
- Custom Font files not loaded on Vercel Edge Function
- Error with linear-gradient HOT 2
- @vercel/og will not work on edge outside of next - noto-sans-v27-latin-regular.ttf HOT 4
- Using CSS `border`, images are broken and exposed
- Optional TailwindCSS
- Functionality for getting bounding box of text from satori
- 2x faster with SatoriOptions.fonts as a global variable HOT 2
- Title HOT 1
- Image in SVG doesn't work when exported to PNG HOT 10
- Transparent linear gradient rendered incorrectly HOT 2
- `word-break: keep-all` breaks when used with `text-wrap: balance`
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 satori.