GithubHelp home page GithubHelp logo

takano-akio / electrotype Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pacak/electrotype

0.0 2.0 0.0 5.14 MB

Reasonably fast OpenGL text rendering

License: Other

Haskell 0.73% C++ 0.33% GLSL 2.29% C 96.35% Makefile 0.04% CSS 0.16% HTML 0.09%

electrotype's Introduction

electrotype

Reasonably fast OpenGL text rendering

This package handles loading and rendering fonts in modern OpenGL. It uses the FreeType library to render the glyphs to textures, and then draws the textures to the screen. The bitmaps for the glyphs are cached in a packed texture atlas. The C code is based on the freetype-gl project, and the Haskell code is an evolving set of bindings to provide reasonably fast and reasonably flexible text rendering.

There are 3 primary goals:

  1. A mode for fast and simple text rendering for limited character sets and without layout capabilities (reusable glyph texture atlantes).

  2. A mode for more sophisticated and flexible text rendering, by using pango or another layout engine to write full paragraphs (or other blocks of text) to texture buffers, and then display the whole texture buffer. For frequently changing text, this is slower than using cached glyphs and a texture atlas, but more flexible in terms of layout and the number of glyphs.

  3. Work in OpenGL 3.2 Core, and don't require scattering across an installation various resource files, such as shaders and fonts.

Installation

You may first need to install a freetype2 dependency package:

  git clone https://github.com/Peaker/freetype2
  cd freetype2
  cabal install

Then, you should be able to install electrotype with a simple cabal install command. (Not yet tested on Windows after forking from FreeTypeGL.)

electrotype's People

Contributors

pacak avatar peaker avatar randrew avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.