ofxTextSuite
ofxTextSuite copied to clipboard
Text looks little bit rotate with 1 degree
I found out you were using:
glTranslatef(x, y, 0.0f);
in stead of:
glTranslatef(x, y, 1);
that's why the text looks a little bit rotated.
It's strange.
When using the example my text looks nice and crisp. And the addon is using glTranslatef(x, y, 0.0f)
But with an other OF app that also shows video and does a bunch more the same text did not look crisp.
Only after making your suggested change to glTranslatef(x, y, 1);
does the text look ok.
There must be something getting carried over from other code. Maybe it needs a ofPushStyle();
?
ofPushStyle
did not help.
But I noticed that my code set x and y with floats which caused blurry text. Changing positions to full integers solved that.
But I also got blurry text when using wrapTextArea()
. To avoid that I do
if(block_message.getHeight() > height_message.get()){
int current_fontsize_message = fontsize_message.get();
while(block_message.getHeight() > height_message.get()){
current_fontsize_message--;
block_message.init(allFont_paths[fontNameIndex].string(), current_fontsize_message);
block_message.setText(user_objects[0].message);
block_message.wrapTextX(width_message.get());
}
// block_message.wrapTextArea(width_message.get(), height_message.get());
}