Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

ofTrueTypeFont: How to get the current spaceSize after loading

$
0
0

@cuinjune wrote:

Hi, I found out ofTrueTypeFont::getSpaceSize() returns zero after loading the font. It only seemed to work once I manually set it with setSpaceSize().
I tried it with several fonts but the results were always the same.

void ofApp::setup(){

    font.load("font.ttf", 50);
    cout << "First : " << font.getSpaceSize() << endl;
    font.setSpaceSize(20);
    cout << "Second : " << font.getSpaceSize() << endl;
}

result :

First : 0
Second : 20

Is there a specific reason why it returns zero after loading or could this be a bug?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles