| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Text.PCF.Embed
Contents
Description
pcf-font-embed allows users to render and embed text with X11 PCF fonts at compile-time. Perhaps the best use-case for this library is in generating textures for text rendering with accelerated graphics. For reference, here is a simple example of pcf-font-embed in action:
{-# LANGUAGE TemplateHaskell #-}
import Graphics.Text.PCF
import Graphics.Text.PCF.Embed
-- | USAGE: program
main :: IO ()
main = putStrLn $ pcf_text_ascii $(embedPCFText "font.pcf.gz" "Hello!")Embedding
Render text at compile time. Default opaque and blank colors of 0x00 and 0xFF are used respectively. The generated expression consists of a PCFText.