← Back

ofxTrueTypeFontUC

github.com/hironishihara/ofxTrueTypeFontUC · @hironishihara
OF 0.10 Typography

An extension of ofTrueTypeFont class for using UNICODE characters. Tested on OSX, iOS, and Windows.

118 43 Last commit 8y ago Created 15y ago

Forks

Forks pushed to more recently than hironishihara/ofxTrueTypeFontUC itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

d3cod3/ofxTrueTypeFontUC by @d3cod3 · ★ 0 · pushed 6y ago
bafonso/ofxTrueTypeFontUC by @bafonso · ★ 0 · pushed 6y ago
local-projects/ofxTrueTypeFontUC by @local-projects · ★ 0 · pushed 7y ago

Branches ahead of master

These branches have commits not yet on master — could be unmerged fixes or work in progress worth a look.

gh-pages 1 commit ahead · last commit 12y ago

README

ofxTrueTypeFontUC



ofxTrueTypeFontUC Screenshot

Overview



An extension of ofTrueTypeFont class for using UNICODE characters. Tested on OSX, iOS, and Windows.

Requirement



No additional library is required.

Installation



1. Download it ( https://github.com/hironishihara/ofxTrueTypeFontUC/archive/master.zip ) 1. Extract the zip file, and rename the extracted folder to ``ofxTrueTypeFontUC
1. Put the 
ofxTrueTypeFontUC
` folder in the `addons` folder in your openFrameworks root folder

Usage



1. Add
`ofxTrueTypeFontUC.h` and `ofxTrueTypeFontUC.cpp` to your project (Refer to IDE setup guide http://openframeworks.cc/setup/ for detail) 1. Put font file (ex. `yourFont.ttf`) in `yourProjectFolder/bin/data` folder 1. Include `ofxTrueTypeFontUC.h

   
cpp // ofApp.h

include "ofxTrueTypeFontUC.h"


1. Declare an instance

   
cpp // ofApp.h class ofApp : public ofBaseApp{ ... ofxTrueTypeFontUC myFont; };

1. Load a font

   
cpp // ofApp.cpp void ofApp::setup(){ ... myFont.loadFont("yourFont.ttf", 64, true, true); }

1. Draw string

   
cpp // ofApp.cpp void ofApp::draw(){ ... myFont.drawStringAsShapes("こんにちは", 100, 100); myFont.drawString("はじめまして", 100, 200); }

Refer 
ofxTrueTypeFontUC.h
`` with regard to other functions.

Contribution



1. Fork it ( http://github.com/hironishihara/ofxTrueTypeFontUC/fork ) 1. Create your feature branch (git checkout -b my-new-feature) 1. Commit your changes (git commit -am 'Add some feature') 1. Rebase your local changes against the master branch 1. Confirm that your feature works just as you intended 1. Confirm that your feature properly works together with functions of ofxTrueTypeFontUC 1. Push to the branch (git push origin my-new-feature) 1. Create new Pull Request

Tested System



License



ofxTrueTypeFontUC is distributed under the MIT License. This gives everyone the freedoms to use ofxTrueTypeFontUC in any context: commercial or non-commercial, public or private, open or closed source. Please see License.txt for details.

Get this addon

HTTPS
SSH