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

Safe HaskellSafe
LanguageHaskell2010

Graphics.Rendering.MiniTypeset.Delimiters

Contents

Description

Automatically stretching/growing (*when possible) delimiters.

No need to import this module directly.

NOTE: these stretching delimiters are composed from overlayed unicode glyphs. They are designed to work with the STIX fonts, other fonts may produce unacceptable results. Transparent rendering is broken too (though that could be fixed in principle).

TODO:

  • growing ceil/floor
  • "compound" brackets like [[, {|, etc
  • fix subscripts and superscripts of big delimited things
  • cleaner implementation
  • maybe hardwire the required glyphs from STIX so that it works with any font?
  • fix transparency
Synopsis

Documentation

data CompoundDelim Source #

A compound delimiter is built from overlayed Unicode glyphs. It can be either fixed (a single glyph; two glyphs next to each other), or adjustable (glyphs with adjustable overlap)

Constructors

FixDelim (forall a. Document a)

something whose size is fixed

Adjustable (forall a. Double -> Document a)

something whose size can be adjusted

Utility

Growing delimiters

data DelimImpl Source #

Constructors

GrowingDelim (forall a. DelimGrower a) 
FixedDelim !(Char, Char) 

Figuring out how to build a delimiter of the target size

growBrace :: Height -> WhichDelim -> Double -> Document a Source #

Note: target height is relative to the font height, but not including line gap! You have to take line gap into account yourself if necessary.

Delimiter builders

Unicode codepoint constants