Skip to content

Bring back textHeight() #3320

Closed
Closed
@devinhalladay

Description

@devinhalladay

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Most appropriate sub-area of p5.js?

  • Color
  • Core/Environment/Rendering
  • Data
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Which platform were you using when you encountered this?

  • Mobile/Tablet (touch devices)
  • Desktop/Laptop
  • Others (specify if possible)

New feature details:

Working with typography in some basic ways is currently very difficult in P5; currently, I'm really struggling with multiple multi-line text boxes that need to be positioned in relation to each other. I see that P5 used to have a textHeight() function that got the height of a text block (though I'm not sure this handled multi-line text) and it was removed in PR #368 because Processing doesn't have an equivalent.

Is there the possibility of bringing this back into P5 so that the library can handle typographic basics on its own without the use of P5.dom elements?

(To clarify, I would like to use this to get the height of a multi-line text block.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions