@@ -37,15 +37,26 @@ tableSize = 0x110000
38-- | Install a custom unicode character width table.
38-- | Install a custom unicode character width table.
40−-- This affects the behavior of the 'wcwidth' function and functions
40+-- This affects the behavior of the 'Graphics.Vty.Image.wcwidth'
41+-- function and functions that call it. It does so by
41−-- that call it. It does so by changing global state available to the C
42+-- changing global state available to the C implementation
42−-- implementation of 'wcwidth'. To ensure that your program gets consistent
43+-- of 'Graphics.Vty.Image.wcwidth'. To ensure that your
43−-- results from evaluating calls to 'wcwidth', the installation of a
44+-- program gets consistent results from evaluating calls to
45+-- 'Graphics.Vty.Image.wcwidth', the installation of a custom table
44−-- custom table should be performed before you call 'wcwidth' in your
46+-- should be performed before you call 'Graphics.Vty.Image.wcwidth' in
45−-- program. This is best done at Vty startup. It's also important to
49+-- This is best done at Vty startup, and if you use
50+-- 'Graphics.Vty.mkVty', that function calls this automatically based on
51+-- the Vty configuration's declared width tables. It is exposed as part
52+-- of the public API so that applications can call this as needed if
53+-- they don't want to control the terminal with 'mkVty' but do want to
54+-- make calls to 'Graphics.Vty.Image.wcwidth'.
56+-- It's also important to note that once a
46−-- note that once a custom table has been installed, it is permanent for
57+-- custom table has been installed, it is permanent for the life of the
47−-- the life of the process. No new table can be installed, and the new
58+-- process. No new table can be installed, and the new custom table
48−-- custom table cannot be removed.
59+-- cannot be removed.
50-- If this function fails for any reason -- if the table cannot be
61-- If this function fails for any reason -- if the table cannot be
51-- installed or is invalid, or if a custom table already exists -- this
62-- installed or is invalid, or if a custom table already exists -- this