minitypeset-opengl-0.1.0.0: Layout and render text with TrueType fonts using OpenGL

Safe HaskellNone
LanguageHaskell2010

Graphics.Rendering.MiniTypeset.FontTexture

Description

Store font glyphs in OpenGL textures

TODO: add (optional) subpixel rendering support (pre-render say 4 versions of the same glyphs with fractional horizontal offsets)

Synopsis

Documentation

data BufLoc Source #

The location of a glyph in a font texture collection

Constructors

BufLoc 

Fields

Instances
Show BufLoc Source # 
Instance details

Defined in Graphics.Rendering.MiniTypeset.FontTexture

data TexBuf Source #

A single texture buffer

Constructors

TexBuf 
Instances
Show TexBuf Source # 
Instance details

Defined in Graphics.Rendering.MiniTypeset.FontTexture

data TexCursor Source #

Constructors

TexCursor 

Fields

data FontTexture Source #

A font texture collection: possibly several textures containing bitmaps a given font with a given height.

newFontTexture' :: Font -> Float -> String -> (Int, Int) -> IO FontTexture Source #

Creates a new (empty) font texture

lookupFontTexture :: FontTexture -> Char -> IO BufLoc Source #

Finds a character in the font texture (rendering it first if necessary). If the glyph is not present in the font, we return the "not defined glyph" instead.

mbLookupFontTexture :: FontTexture -> Char -> IO (Maybe BufLoc) Source #

Finds a character in the font texture (rendering it first if necessary)

testRenderFullTextureQuad :: FontTexture -> Int -> IO () Source #

Renders the given font texture as a quad (useful for debugging)