#1044 ✓ duplicate
Pomax

wrong text properties on init (1.0)

Reported by Pomax | January 25th, 2011 @ 05:04 PM | in 1.1 Code Freeze

P5 uses an unspecified font at text size 12 as default text size, if none is issued explicitly. Calling textSize(12) and drawing new text does not change the font or size.

void setup() { size(100,100); noLoop(); }
void draw() { text("test", 33,33); textSize(12); text("test",33,66); }

gives an identical text.

Processing.js doesn't just change the textsize, but also changes the font used, thus invalidating the text size because the metrics are completely different.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Processing.js is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java applets. Processing.js uses Javascript to draw shapes and manipulate images on the HTML5 Canvas element. The code is light-weight, simple to learn and makes an ideal tool for visualizing data, creating user-interfaces and developing web-based games.

Shared Ticket Bins

Referenced by

Pages