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

Let characters other than space break lines #7258

Open
1 of 17 tasks
kyfex-uwu opened this issue Sep 9, 2024 · 2 comments
Open
1 of 17 tasks

Let characters other than space break lines #7258

kyfex-uwu opened this issue Sep 9, 2024 · 2 comments

Comments

@kyfex-uwu
Copy link

Increasing access

This would increase support for languages that use different spaces, and it would give greater control over text as a whole.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature request details

Currently, when rendering text with a width parameter the given text is only broken on space characters. If a user wants to insert characters like a zero width joiner in order to allow text wrapping in a specific spot, p5 just ignores it and will not split the text.

Copy link

welcome bot commented Sep 9, 2024

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!

@orrkislev
Copy link
Contributor

I'm not sure I understand the use case here:

text('some text \n this is a new line', 50,50)

would work with or without setting the width

or is it something for specific languages? Thai? (I'm sorry for my ignorance)

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

No branches or pull requests

3 participants