Skip to content

TextAlign([any], CENTER) does not forcibly wrap text inside of the text block, and the text will spill outside of it  #5785

@ghost

Description

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
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.4.2

Web browser and version

Version 1.43.88 Chromium: 105.0.5195.68 (Official Build) (64-bit)

Operating System

Ubunto 20.04.1

Steps to reproduce this

Steps:

  1. use textAlign([any], CENTER)
  2. Create a long string and put it in a text box with a x,y,w,h limit defined
  3. It will render outside of the box

Snippet:

textAlign(CENTER, CENTER)
text("Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World", 100, 100, 200, 200)

spilling-text-box

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions