Bug 1416 : vlw loadFont is not the same quality as createFont
Last modified: 2009-12-24 12:08




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
jeffg
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2009-12-23 18:53
Processing 1.0.9
Mac 10.6.2, MacBook Pro

//CODE
PFont font, font2;
void setup() {
size(400,150);
font = loadFont("Tahoma-48.vlw");
font2 = createFont("Tahoma", 48, true);
fill(255);
smooth();
}
void draw() {
background(0);
textFont(font,16);
text("The quick brown fox jumps over the lazy dog", 20, height/2-20);
textFont(font2,16);
text("The quick brown fox jumps over the lazy dog", 20, height/2+10);
}


// Creating a vlw font with the PDE using the Smooth option does not
produce the same quality font. Using createFont produces a much cleaner
and level font than using loadFont.
Additional Comment #1 From fry 2009-12-23 18:57
This is covered in the reference for createFont().
Additional Comment #2 From jeffg 2009-12-23 21:20
Could you have loadFont check for a native font as does createFont? Your
syntax is easy enough to parse. Tahoma-48.vlw = ("Tahoma", 48) Add a
boolean at the end for smoothing... loadFont("Tahoma-48.vlw", true); =
("Tahoma", 48, true)

It would be nice to have the native font option without having to create
the font at start. It would also reduce the ambiguity between the two methods.
Additional Comment #3 From fry 2009-12-24 06:22
Read the reference for loadFont().
Additional Comment #4 From jeffg 2009-12-24 12:08
Excellent! Thanks... Guess I should RTFM. :-)
Might be nice if "hint(ENABLE_NATIVE_FONTS);" was the default. From your
documentation, it appears to perform and look better.