vty-6.1: A simple terminal UI library

Safe Haskell | Safe-Inferred
Language | Haskell2010

Graphics.Vty.UnicodeWidthTable.Query

Synopsis

- buildUnicodeWidthTable :: (Char -> IO Int) -> Char -> IO UnicodeWidthTable
- defaultUnicodeTableUpperBound :: Char

# Documentation

buildUnicodeWidthTable :: (Char -> IO Int) -> Char -> IO UnicodeWidthTable Source #

Construct a unicode character width table. This works by using the provided function to obtain the appropriate width for each character in a wide range of Unicode code points, which on some platforms may perform local terminal operations or may interact with system libraries. Depending on how the provided width function works, this may need to be run only in a terminal that is not actively controlled by a Vty handle.

The character argument specifies the upper bound code point to test when building the table. This allows callers to decide how much of the Unicode code point space to scan when building the table.

This does not handle exceptions.

defaultUnicodeTableUpperBound :: Char Source #