processing / processing/p5.js

Issues with stroke join for text

Open
#5,408 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Typography Bug
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Note that this only occurs when strokeWeight is large in relation to textSize
Setting strokeJoin(ROUND) or strokeJoin(BEVEL) eliminates the problem

Screenshot 2021-09-13 at 1 17 31 PM

Related to #3035 -- steps to reproduce: show font with stroke and large relative strokeWeight:

function setup() {
  createCanvas(750, 500);
  background(150);

  textFont(kingthings);
  textSize(42);

  strokeWeight(4);
  //strokeJoin(ROUND);//BEVEL
  stroke(0);

  fill(255);
  text("if I found a fun igloo", 100, 200);
}
Most appropriate sub-area of p5.js?
  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)
Details about the bug:
  • p5.js version: p5.js v1.4.0
  • Web browser and version: Firefox 92
  • Operating System: OS X

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied setup() example in p5.js v1.4.0, using textFont(), textSize(), strokeWeight(), strokeJoin(), and text(). Compare the default join with ROUND and BEVEL in Firefox. Done means large-stroke text no longer shows the reported join artifact while preserving the existing ROUND and BEVEL behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.