processing/p5.js

[p5.js 2.0 Bug Report]: width/height/options overloads inconsistent/incorrect for typography methods

Open

#7 820 ouverte le 15 mai 2025

Voir sur GitHub
 (5 commentaires) (0 réactions) (0 assignés)JavaScript (3 178 forks)batch import
Area:TypographyDocumentationHelp Wantedp5.js 2.0+

Métriques du dépôt

Stars
 (20 784 stars)
Métriques de merge PR
 (Merge moyen 9j 8h) (56 PRs mergées en 30 j)

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

p5.js version

2.0.2

Web browser and version

N/A

Operating system

N/A

Steps to reproduce this

textToModel has these overloads:

textToModel(str, x, y, width, height, [options], [options.extrude], [options.sampleFactor])

textToContours has these overloads:

textToContours(str, x, y, [options])

textToPoints has these:

textToPoints(str, x, y, [options])

A few issues to fix:

  • All of these optionally support width and height. The overloads should maybe be:

    something(str, x, y, [options])
    something(str, x, y, width, height, [options])
    
  • All should have the same base options. These include sampleFactor and simplifyThreshold (see the 1.x docs for descriptions of these.) textToModel additionally has extrude.

Guide contributeur