Skip to content
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

Open
eric-schleicher opened this issue Nov 6, 2015 · 12 comments
Open

Multiline #164

eric-schleicher opened this issue Nov 6, 2015 · 12 comments

Comments

@eric-schleicher
Copy link

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!

@fthues
Copy link

fthues commented Dec 15, 2015

+1, that would be great to have.

@fdb
Copy link
Contributor

fdb commented Dec 16, 2015

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).

@eric-schleicher
Copy link
Author

I have some code that I could share here. Its essentially a (very basic)
multiline object and provides control over basic justification.

Im not particularly proud of it, but a better developer might find it
useful.

Let me know
On Dec 16, 2015 5:11 AM, "Frederik De Bleser" notifications@github.com
wrote:

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).


Reply to this email directly or view it on GitHub
#164 (comment)
.

@fdb
Copy link
Contributor

fdb commented Dec 17, 2015

Not claiming I'm a better developer, but I would love to take a look :-)

@mattdesl
Copy link

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. 😄

@fdb
Copy link
Contributor

fdb commented Jun 21, 2016

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.

@mattdesl
Copy link

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 lineHeight act like CSS spec rather than typical print handling) and also is very hard to properly implement (i.e. Harfbuzz).

I think it's better to push things into user-land modules since npm has become pretty widely adopted by JS devs.

😄

@fdb
Copy link
Contributor

fdb commented Jun 21, 2016

Well now I have a module to refer to 😄

@Harbs
Copy link
Contributor

Harbs commented Jun 30, 2016

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.

@kuzvac
Copy link

kuzvac commented Feb 6, 2017

Any news about this feature? :)

@fdb
Copy link
Contributor

fdb commented Feb 6, 2017

Hi @kuzvac, we're not going to make this part of opentype.js: look at opentype-layout for a module that does this.

@kuzvac
Copy link

kuzvac commented Feb 6, 2017

@fdb ok, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants