All Projects → benhj → glfreetype

benhj / glfreetype

Licence: other
An extremely simple OpenGL C++ FreeType library

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to glfreetype

Tehreer-Cocoa
Standalone text engine for iOS
Stars: ✭ 31 (+14.81%)
Mutual labels:  freetype
odin
High level 2d game engine written in Haskell.
Stars: ✭ 28 (+3.7%)
Mutual labels:  freetype
makegameengineatnight
从零编写游戏引擎教程 Writing a game engine tutorial from scratch
Stars: ✭ 1,348 (+4892.59%)
Mutual labels:  freetype
lv lib freetype
Interface to FreeType to generate font bitmaps run time
Stars: ✭ 41 (+51.85%)
Mutual labels:  freetype
gdx-freetype-gwt
Freetype for gwt
Stars: ✭ 41 (+51.85%)
Mutual labels:  freetype
FFmpeg-iOS-build-script
iOS平台编译FFmpeg的脚本,可能包含多个FFmpeg版本,不同版本可能支持不同的第三方库等
Stars: ✭ 17 (-37.04%)
Mutual labels:  freetype
Tehreer-Android
Standalone text engine for Android aimed to be free from platform limitations
Stars: ✭ 61 (+125.93%)
Mutual labels:  freetype
Ffmpeg Android
FFmpeg for Android compiled with x264, libass, fontconfig, freetype, fribidi and lame (Supports Android 4.1+)
Stars: ✭ 1,554 (+5655.56%)
Mutual labels:  freetype
Mobile Ffmpeg
FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
Stars: ✭ 3,204 (+11766.67%)
Mutual labels:  freetype
text-rendering-tests
Unicode’s test suite for text rendering engines
Stars: ✭ 135 (+400%)
Mutual labels:  freetype
avatarbuilder
Using freetype to build default avatar with string
Stars: ✭ 14 (-48.15%)
Mutual labels:  freetype
harfbuzz-example
Harfbuzz text-shaping example with OpenGL using Freetype
Stars: ✭ 104 (+285.19%)
Mutual labels:  freetype

glfreetype

Another OpenGL FreeType library

I needed to display text in OpenGL. Other libraries were simply too massive for my needs/there were no clear examples. I discovered FreeType and the following NeHe tutorial:

http://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/

The repository here is basically a simple amalgamation of those ideas. The end result is that you can use arbitrary .ttf fonts, e.g. using Arial.ttf which on my mac is located under /Library/fonts/:

Image of test example

Assuming a cmake build system, clone this repository into your source tree and add the following lines to your CMakeLists.txt file:

find_package(OpenGL REQUIRED)
find_package(Freetype REQUIRED)
file(GLOB_RECURSE glfreetype glfreetype/src/*.cpp glfreetype/include/glfreetype/*.hpp)
include_directories(glfreetype/include)
add_library(glfreetype_lib ${glfreetype})
target_compile_options(glfreetype_lib PUBLIC ${COMP_FLAGS})

Note, you will also need to link with glfreetype_lib during the linking stage of whatever project you're building. This can be done by editing the following line in your CMakeLists.txt file:

target_link_libraries(executableName some_lib some_other_lib etc_lib glfreetype_lib ${OPENGL_LIBRARIES} glfw ${FREETYPE_LIBRARIES})

Please check out the test binary (build from the source root with):

mkdir build
cd build
cmake ..
make
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].