Last active
September 19, 2016 05:29
-
-
Save gaborpapp/591775c3b8b7ee1e63fe59923ad0be1f to your computer and use it in GitHub Desktop.
Cinder linux accent test
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 "cinder/Font.h" | |
#include "cinder/app/App.h" | |
#include "cinder/app/RendererGl.h" | |
#include "cinder/gl/gl.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
class AccentTestApp : public App | |
{ | |
public: | |
void setup() override; | |
void draw() override; | |
private: | |
Font mFont; | |
}; | |
void AccentTestApp::setup() | |
{ | |
// free font from http://fontzone.net/download/digital-sans-ef-medium | |
mFont = Font( loadAsset( "Digital Sans EF Medium.ttf" ), 32 ); | |
} | |
void AccentTestApp::draw() | |
{ | |
gl::viewport( getWindowSize() ); | |
gl::setMatricesWindow( getWindowSize() ); | |
gl::clear(); | |
gl::drawString( "árvíztűrő tükörfúrógép", vec2( 100, 100 ), Color::white(), mFont ); | |
gl::drawString( "ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP", vec2( 100, 160 ), Color::white(), mFont ); | |
} | |
CINDER_APP( AccentTestApp, RendererGl ) |
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
cmake_minimum_required( VERSION 3.0 FATAL_ERROR ) | |
set( CMAKE_VERBOSE_MAKEFILE ON ) | |
project( AccentTest ) | |
set( APP_NAME "${PROJECT_NAME}App" ) | |
set( CMAKE_BUILD_TYPE "Release" ) | |
get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../" ABSOLUTE ) | |
get_filename_component( APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | |
set( APP_INCS | |
${APP_DIR}/include | |
) | |
set( APP_SRCS | |
${APP_DIR}/src/AccentTestApp.cpp | |
) | |
include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) | |
ci_make_app( | |
APP_NAME ${APP_NAME} | |
INCLUDES ${APP_INCS} | |
SOURCES ${APP_SRCS} | |
CINDER_PATH ${CINDER_PATH} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment