Font unit Processing

I see that 30 px font in Adobe Illustrator appears as 15 px in Processing when I set size to 30. Which measuring unit does Processing use for fonts?

Tagged:

Answers

  • http://processing.org/reference/textSize_.html

    Font size is measured in units of pixels.

    Take the example from this page, add ascenders and descenders, and measure. You will find only one pixel less than the given size, which account for interline.

    size(200, 200);
    background(0);
    fill(255);
    textSize(26); 
    text("WORDdp", 10, 50); 
    textSize(14);
    text("WORDdp", 10, 70);
    
Sign In or Register to comment.