OpenGL text using one vertex buffer, one texture and FreeType
C C++ HTML Other
Switch branches/tags
Nothing to show
Clone or download
Latest commit bcd2b5f Feb 9, 2018
rougier Merge pull request #179 from ignitusboyone/master
CMAKE Install directive and limited Android Support
Permalink
Failed to load latest commit information.
cmake/Modules Replace full license banner with reference to `LICENSE` file Oct 31, 2016
data Add 'bold-italic' ANSI example to `ansi` demo. Feb 24, 2016
demos demos/atb-agg: remove misleading code which does nothing Dec 30, 2016
doc Update document screenshots Nov 3, 2016
fonts Normalize line endings to LF May 20, 2015
harfbuzz Raise minimum required CMake version to 2.8.12 Oct 31, 2016
shaders Replace full license banner with reference to `LICENSE` file Oct 31, 2016
tests added conditional to AntTweakBar test Oct 29, 2017
windows Fixed MinGW Build Aug 1, 2016
.gitattributes Normalize line endings to LF May 20, 2015
.gitignore Installation instructions on Ubuntu 15.10 May 1, 2016
.travis.yml Enable screenshot comparision tests on Travis-CI Nov 3, 2016
CMakeLists.txt I was under the impression that the PERMISSION worked like a umask, t… Feb 7, 2018
INSTALL.md GLFW Ubuntu package works on 16.10 Dec 27, 2016
LICENSE Replace full license banner with reference to `LICENSE` file Oct 31, 2016
README.md Add AppVeyor status badge to README.md Oct 28, 2016
TODO Removed misplaced 3.0 branch Aug 13, 2012
appveyor.yml Disable tests on AppVeyor for now Nov 3, 2016
distance-field.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
distance-field.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
edtaa3func.c Only include math.h where required Oct 27, 2016
edtaa3func.h Only include math.h where required Oct 27, 2016
font-manager.c 'static' file_exists to avoid colliding with ghc's Win32Utils Dec 28, 2016
font-manager.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
freetype-gl.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
makefont.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
markup.h remove "rise" field from markup_t Dec 27, 2016
opengl.h Inital __ANDROID__ Support using GLESv3 Feb 6, 2018
platform.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
platform.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
text-buffer.c text_buffer_add_text: Fix read of undefined memory and performance bug May 18, 2017
text-buffer.h Remove font_manager_t attribute from text_buffer_t Nov 1, 2016
texture-atlas.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
texture-atlas.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
texture-font.c fixed small warning about return value in texture-font.c Oct 29, 2017
texture-font.h Declared new method texture_font_enlarge_atlas Feb 5, 2017
utf8-utils.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
utf8-utils.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vec234.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vector.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vector.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vertex-attribute.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vertex-attribute.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vertex-buffer.c Replace full license banner with reference to `LICENSE` file Oct 31, 2016
vertex-buffer.h Replace full license banner with reference to `LICENSE` file Oct 31, 2016

README.md

Freetype GL - A C OpenGL Freetype engine

Build Status Travis Build Status Appveyor

A small library for displaying Unicode in OpenGL using a single texture and a single vertex buffer.

Screenshot

Installation instructions.

Code organization

Mandatory files

  • texture-font: The texture-font structure is in charge of creating bitmap glyphs and to upload them to the texture atlas.

  • texture-atlas: This structure is responsible for the packing of small regions into a bigger texture. It is based on the skyline bottom left algorithm which appear to be well suited for storing glyphs. More information at: http://clb.demon.fi/files/RectangleBinPack.pdf

  • vector: This structure loosely mimics the std::vector class from c++. It is used by texture-atlas (for storing nodes), texture-font (for storing glyphs) and font-manager (for storing fonts). More information at: http://www.cppreference.com/wiki/container/vector/start

Optional files

  • markup: Simple structure that describes text properties (font family, font size, colors, underline, etc.)

  • font-manager: Structure in charge of caching fonts.

  • vertex-buffer: Generic vertex buffer structure inspired by pyglet (python). (more information at http://www.pyglet.org)

  • edtaa3func: Distance field computation by Stefan Gustavson (more information at http://contourtextures.wikidot.com/)

  • makefont: Allow to generate header file with font information (texture + glyphs) such that it can be used without freetype.

Contributors

  • Ryan.H.Kawicki (Initial CMake project)
  • Julian Mayer (Several bugfixes and code for demo-opengl-4.cc)
  • Sylvain Duclos (Android port)
  • Wang Yongcong (Improvements on the windows build and code review)
  • Jonas Wielicki (Bug report & fix on the CMakefile)
  • whatmannerofburgeristhis (Bug report in makefont)
  • Andrei Petrovici (Fine analysis of the whole code and report of potential problems)
  • Cristi Caloghera (Report on bad vertex buffer usage)
  • Andrei Petrovici (Code review)
  • Kim Jacobsen (Bug report & fix)
  • bsoddd (Bug report & fix)
  • Greg Douglas (Bug report & fix)
  • Jim Teeuwen (Bug report & fix)
  • quarnster (Bug report & fix)
  • Per Inge Mathisen (Bug report & fix)
  • Wojciech Mamrak (Code review, bug report & fix)
  • Wael Eloraiby (Put code to the C89 norm and fix CMakefile)
  • Christian Forfang (Code review, fix & patch for 3.2 core profile)
  • Lukas Murmann (Code review & fix for 3.2 core profile)
  • Jérémie Roy (Code review, fix and new ideas)
  • dsewtz (Bug report & fix)
  • jcgamestoy (Bug report & fix)
  • Behdad Esfahbod (Bug fix on harfbuzz demo)
  • Marcel Metz (Bug report & fix, CMmake no demo option, makefont parameters)
  • PJ O'Halloran (svn to git migration)
  • William Light (Face creation from memory)
  • Jan Niklas Hasse (Bug report & fix + README.md)
  • Pierre-Emmanuel Lallemant (Bug report & fix + travis setup)
  • Robert Conde (Bug report & fix)
  • Mikołaj Siedlarek (Build system bug fix)
  • Preet Desai (Bug report & fix)
  • Andy Staton (CMake fix and added namespace safeguard (avoiding glm collisions))
  • Daniel Burke (Removed GLEW dependency and fix problems with font licences)
  • Bob Kocisko (Added horizontal text alignment and text bounds calculation)
  • Ciro Santilli (Improve markdown documentation)