Hoogle Search
Within LTS Haskell 24.64 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
textSpanCharWidth :: SpanOp -> !Intvty Graphics.Vty.Span No documentation available.
textSpanOutputWidth :: SpanOp -> !Intvty Graphics.Vty.Span No documentation available.
parseUnicodeWidthTable :: ByteString -> Either String UnicodeWidthTablevty Graphics.Vty.UnicodeWidthTable.IO Parse a binary unicode width table.
readUnicodeWidthTable :: FilePath -> IO (Either String UnicodeWidthTable)vty Graphics.Vty.UnicodeWidthTable.IO Load a binary unicode width table from the specified file. This either returns a successfully parsed table or a table parsing error message. This does not handle I/O exceptions.
writeUnicodeWidthTable :: FilePath -> UnicodeWidthTable -> IO ()vty Graphics.Vty.UnicodeWidthTable.IO Write the unicode width table to the specified path. This does not handle I/O exceptions.
installUnicodeWidthTable :: UnicodeWidthTable -> IO ()vty Graphics.Vty.UnicodeWidthTable.Install Install a custom unicode character width table. Such tables are obtained with buildUnicodeWidthTable and readUnicodeWidthTable. ALERT! This function is probably not what you want to use because it is automatically called by mkVty. You will only ever need to call this function if you want to use functions in Width without controlling the terminal with mkVty. This affects the behavior of the wcwidth function and functions that call it. It does so by changing global state available to the C implementation of wcwidth. To ensure that your program gets consistent results from evaluating calls to wcwidth, the installation of a custom table should be performed before you call wcwidth in your program. This is best done at Vty startup, and if you use mkVty, that function calls this automatically based on the Vty configuration's declared width tables. It is exposed as part of the public API so that applications can call this as needed if they don't want to control the terminal with mkVty but do want to make calls to wcwidth. It's also important to note that once a custom table has been installed, it is permanent for the life of the process. No new table can be installed, and the new custom table cannot be removed. If this function fails for any reason -- if the table cannot be installed or is invalid, or if a custom table already exists -- this will raise a TableInstallException exception. This function is thread-safe.
buildUnicodeWidthTable :: (Char -> IO Int) -> Char -> IO UnicodeWidthTablevty Graphics.Vty.UnicodeWidthTable.Query 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.
-
vty Graphics.Vty.UnicodeWidthTable.Types A run-length-encoded table of Unicode character widths.
UnicodeWidthTable :: [WidthTableRange] -> UnicodeWidthTablevty Graphics.Vty.UnicodeWidthTable.Types No documentation available.
-
vty Graphics.Vty.UnicodeWidthTable.Types A range of code points in a width table.