Created
July 3, 2018 18:05
-
-
Save hiroMTB/2b57464843cb1937081ab7e7c944fae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofApp.h" | |
void ofApp::setup(){ | |
ofBackground(0, 255); | |
ofTrueTypeFont::setGlobalDpi(72); | |
font.load("Gotham Bold.otf", 22, true, true); | |
font.setLetterSpacing(3); | |
} | |
void ofApp::draw(){ | |
ofPushMatrix(); | |
ofTranslate(20, ofGetHeight()/2); | |
ofSetColor(255); | |
font.drawString("OMNIJEWEL SATELLITE SPEAKERS", 0, 0); | |
ofPopMatrix(); | |
ofDrawBitmapStringHighlight("Letter Spacing : "+ ofToString(lp,2), 20, 20); | |
} | |
void ofApp::keyPressed(int key){ | |
switch(key){ | |
case OF_KEY_UP: | |
lp += 0.1; | |
font.setLetterSpacing(lp); | |
break; | |
case OF_KEY_DOWN: | |
lp -= 0.1; | |
font.setLetterSpacing(lp); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment