Code Monkey home page Code Monkey logo

Comments (5)

shuding avatar shuding commented on May 17, 2024 6

Looks like the correct way to go in the future:

CleanShot 2022-08-22 at 16 31 43@2x

https://twitter.com/KhaledGhetas/status/1548752758282534913

from satori.

shuding avatar shuding commented on May 17, 2024 5

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.

devongovett avatar devongovett commented on May 17, 2024 2

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.

jlarmstrongiv avatar jlarmstrongiv commented on May 17, 2024 1

@shuding how would you workaround the limitations of Harfbuzz, such as line breaking?

from satori.

LuciNyan avatar LuciNyan commented on May 17, 2024

@shuding how would you workaround the limitations of Harfbuzz, such as line breaking?

Thank you for sharing this!

from satori.

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.