openFrameworks 로 작성하는 프로그램에서 한글 폰트 설정 및 출력하기
아래 예제는 ofTrueTypeFont 클래스를 사용하여 폰트를 로드하고 한글 문자열을 출력하는 방법을 보여준다.
ofApp.h
#pragma once
#include "ofMain.h"
#include "ofxDatGui.h"
class ofApp : public ofBaseApp
{
public:
    void setup();
    void update();
    void draw();
private:
    ofTrueTypeFont font1;
};
ofApp.cpp
#include "ofApp.h"
void ofApp::setup()
{
...
    ofTrueTypeFontSettings settings(ofxDatGuiTheme::AssetPath + "ofxbraitsch/fonts/godoMaum.ttf", 64);
    settings.addRanges(ofAlphabet::Korean);
    settings.addRanges(ofAlphabet::Latin);
    font1.load(settings);
}
void ofApp::draw()
{
...
    ofSetColor(ofColor::greenYellow);
    font1.drawString(string("안녕하세요.\nhttps://makersweb.net"), 100, 100);
}

| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 | 
|---|---|---|---|---|
| 16 | C++를 위한 Lottie 라이브러리 with SDL2   | makersweb | 2021.08.15 | 3911 | 
| 15 | ZeroMQ 를 이용한 Qt 응용프로그램 간 통신   | makersweb | 2021.08.28 | 3163 | 
| 14 | VSCode 와 Qbs 플러그인으로 C/C++ 개발환경 구성   | makersweb | 2021.09.12 | 3457 | 
| 13 | Flutter/Dart 와 Qt/QML 비교   | makersweb | 2021.11.07 | 3461 | 
| 12 | CopperSpice 에 대해서 (C++ Gui 라이브러리)   | makersweb | 2022.01.02 | 3465 | 
| 11 | Flutter Application 에서 한글(EUC-KR) 깨져서 나오는 문제   | makersweb | 2022.01.06 | 5964 | 
| 10 | Chromium과 Ozone 층   | makersweb | 2022.03.03 | 3079 | 
| 9 | AGL (Automotive Grade Linux) 개요   | makersweb | 2022.06.19 | 5508 | 
| 8 | OTA 오픈소스 프로젝트 | makersweb | 2022.08.03 | 3062 | 
| 7 | NAppGUI,  C언어용 크로스 플랫폼 GUI 라이브러리   | makersweb | 2022.10.10 | 3966 | 
| 6 | Windows에서 Qt Creator + CMake + vcpkg 로 C++ 개발환경 구성 (POCO 라이브러리 DirectoryWatcher 예제)   | makersweb | 2023.01.14 | 2726 | 
| 5 | LVGL 을 통해 GUI 구현 시 한글 폰트 추가   | makersweb | 2023.02.07 | 5186 | 
| » | openFrameworks 한글 폰트 설정 및 출력하기   | makersweb | 2023.02.19 | 1959 | 
| 3 | [NodeGui] JavaScript로 데스크탑 응용프로그램 작성   | makersweb | 2023.02.21 | 5449 | 
| 2 | Flutter 위젯의 상태관리에 대해서   | makersweb | 2023.04.06 | 2628 | 
| 1 | Elastic Stack 에 대해서   | makersweb | 2024.08.25 | 2529 |