processing/p5.js

textAscent() and textDescent() broken if textSize > 200

开放

#8,771 创建于 2026年5月8日

 (12 条评论) (1 个反应) (0 位负责人)JavaScript (3,178 个派生)batch import
Area:TypographyBugHelp Wanted

仓库指标

星标
 (20,784 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • p5.strands
  • WebGL
  • DevOps, Build process, Unit testing
  • Internationalization (i18n)
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.11.13

Web browser and version

Chrome latest

Operating system

MacOS

Steps to reproduce this

Steps:

  1. textSize(201)
  2. textDescent()

Snippet:

https://editor.p5js.org/JuanIrache/sketches/2VVe5sram

When text size is larger than 200, trextAscent() and textDescent() break. Their total sum is correct, but they don't point to the top and bottom of the font any more.

贡献者指南