← Back

ofxIME

github.com/tettou771/ofxIME · @tettou771
OF 0.12 GUI Typography macOS

An openFrameworks addon for native OS input method editor support, enabling offline Japanese text input on macOS.

1 0 Last commit 10mo ago Created 10mo ago

README

ofxIME



openFrameworks addon for native OS IME (Input Method Editor) support.

thumbnail

Overview



ofxIME enables Japanese text input in openFrameworks applications using the native OS IME. Unlike network-based solutions, it works offline with zero latency.

Platform Support



PlatformStatus
macOSSupported
WindowsPlanned (contributions welcome!)
LinuxNot supported
Tested with openFrameworks 0.12.1 on macOS.

Features



Installation



Clone this repository into your addons folder:

cd /path/to/openFrameworks/addons
git clone https://github.com/tettou771/ofxIME.git


Usage



Basic Setup



#include "ofxIME.h"

class ofApp : public ofBaseApp {
    ofxIME ime;

    void setup() {
        // Set font (required for rendering)
        ime.setFont("/System/Library/Fonts/ヒラギノ角ゴシック W3.ttc", 24);
        ime.enable();
    }

    void draw() {
        ofSetColor(255);
        ime.draw(20, 50);
    }
};


API



// Enable/disable IME
ime.enable();
ime.disable();
bool enabled = ime.isEnabled();

// Check input mode
bool japanese = ime.isJapaneseMode();

// Get text
string text = ime.getString();

// Clear text
ime.clear();

// Set cursor position by mouse
ime.setCursorByMouse(mouseX, mouseY);


For a complete example, see the example folder.

License



MIT License - see LICENSE for details.

Author



tettou771

Related



Get this addon

HTTPS
SSH