-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline #164
Comments
+1, that would be great to have. |
Multi-line text is certainly a good idea! This would probably only be supported for western languages, though (I have no experience with the layout of complex scripts, where we get into Harfbuzz territory). |
I have some code that I could share here. Its essentially a (very basic) Im not particularly proud of it, but a better developer might find it Let me know
|
Not claiming I'm a better developer, but I would love to take a look :-) |
I just released opentype-layout which should handle basic word wrapping and new line characters. If nothing else, the source can be used as a reference for future work. 😄 |
Thanks @mattdesl, looks good! I'm still pondering if this is something that falls in the scope of OpenType.js, or is something that can be handled through libraries. |
I personally don't think it should be in scope of Opentype.js, as it has the potential to bloat the library, become tied to application-specific rendering (i.e. making I think it's better to push things into user-land modules since npm has become pretty widely adopted by JS devs. 😄 |
Well now I have a module to refer to 😄 |
I agree that multi-line is important, and I also agree that it should probably not be part of the core. (a complete solution is a very complex problem) @fdb I do have experience with complex scripts and I'm currently the one maintaining Apache Flex TLF. I'm first dipping my toes into opentype.js, and I'm impressed with what you've done. I'm hoping to build a wrapper around it to emulate the FTE and hopefully allow TLF to use opentype.js to render the text at the core. I'd love to discuss my thoughts if you want to have a discussion off-line. |
Any news about this feature? :) |
Hi @kuzvac, we're not going to make this part of opentype.js: look at opentype-layout for a module that does this. |
@fdb ok, thank you. |
This is more of a questions than an issue.
Is there a reason (techical/philospical) not to support the generation of multiline text?
i can see how this might be considered to be too high level function for open type as it (perhap not so) subtly implies the handling of handling justifications and line heights
Generally, i would expect that in most fonts there is information (either explicitly or derivable) on how to set the a base line spacing. I'm unfamiliar on how to determine this... any pointers would be appreciated...
I just wasn't sure if it was a possibility, or whether i need to implement this in my own code that uses opentype, or whether it might be something we could contribute, or create as a wrapper library.
Fabric has sort of nailed this down, but we're no longer using it because it doesn't work for our purposes, but alas multiline text is important for our application.
-Thanks for creating this awesome library!
The text was updated successfully, but these errors were encountered: