From 43e506422bd411c81e802c9ef24db7cb5ce233c1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 14 Aug 2014 12:42:56 +0200 Subject: compose table: improve braille pattern writting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- res/compose | 68 +++++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) (limited to 'res/compose') diff --git a/res/compose b/res/compose index 28c71b7..b28ebc7 100644 --- a/res/compose +++ b/res/compose @@ -41,7 +41,7 @@ dead_ascii("~") (["-" "="] ["y" "Y"]) : "¥" ("!" "|") : "¦" (["o" "O"] ["s" "S"]) : "§" -dead_ascii("¨", "\"") +dead_ascii("¨" "\"") (["o" "O"] ["c" "C"]) : "©" ( ) "_" "a" : "ª" "<" "<" : "«" @@ -252,9 +252,9 @@ composite("¨" "\"" "y" "ÿ") "m" " " : "\u202F" # narrow no-break space "%" ["o" "."] : "‰" "%" ["O" ":"] : "‱" - ("1" ["'", "´"]) : "′" - ("2" ["'", "´"]) : "″" - ("3" ["'", "´"]) : "‴" + ("1" ["'" "´"]) : "′" + ("2" ["'" "´"]) : "″" + ("3" ["'" "´"]) : "‴" ("1" "`") : "‵" ("2" "`") : "‶" ("3" "`") : "‷" @@ -291,7 +291,7 @@ composite("¨" "\"" "y" "ÿ") ("_" "U") : "⁔" ("x" "*") : "⁕" "." ":" : "⁖" - ("4" ["'", "´"]) : "⁗" + ("4" ["'" "´"]) : "⁗" "." ":" "." : "⁘" ":" "." ":" : "⁙" "|" "." "." : "⁚" @@ -375,50 +375,52 @@ dead_ascii("ˇ") # TODO Supplemental Arrows-A # Braille Patterns: - "b" : "\u2800" - "b" "1" : "\u2801" - "b" "2" : "\u2802" - "b" "3" : "\u2804" - "b" "4" : "\u2808" - "b" "5" : "\u2810" - "b" "6" : "\u2820" - "b" "7" : "\u2840" - "b" "8" : "\u2880" +function braille/1 + \or(\lsh(1 \sub("\1" "0")) "\u2800") +end function macro braille_double/1 let \2 : "\u2800" - if \and(\1, 1) = 1 - let \2 : \or(\2, 8) + if \and(\1 1) = 1 + let \2 : \or(\2 8) endif - if \and(\1, 2) = 2 - let \2 : \or(\2, 16) + if \and(\1 2) = 2 + let \2 : \or(\2 16) endif - if \and(\1, 4) = 4 - let \2 : \or(\2, 32) + if \and(\1 4) = 4 + let \2 : \or(\2 32) endif - if \and(\1, 8) = 8 - let \2 : \or(\2, 1) + if \and(\1 8) = 8 + let \2 : \or(\2 1) endif - if \and(\1, 16) = 16 - let \2 : \or(\2, 2) + if \and(\1 16) = 16 + let \2 : \or(\2 2) endif - if \and(\1, 32) = 32 - let \2 : \or(\2, 4) + if \and(\1 32) = 32 + let \2 : \or(\2 4) endif - if \and(\1, 64) = 64 - let \2 : \or(\2, 128) + if \and(\1 64) = 64 + let \2 : \or(\2 128) endif - if \and(\1, 128) = 128 - let \2 : \or(\2, 64) + if \and(\1 128) = 128 + let \2 : \or(\2 64) endif - "\1" "\1" : "\or(\1, \2)" + "\1" "\1" : "\or(\1 \2)" end macro + "b" : "\u2800" +for "1" to "8" as \1 + "b" "\1" : "\braille(\1)" + for \add(\1 1) to "8" as \2 + "B" ("\1" "\2") : "\or(\braille(\1) \braille(\2))" + end for +end for for "\u2800" to "\u28FF" as \1 braille_double(\1) - for \add(\1, 1) to "\u28FF" as \2 - ("\1" "\2") : "\or(\1, \2)" + for \add(\1 1) to "\u28FF" as \2 + ("\1" "\2") : "\or(\1 \2)" end for end for + # TODO Supplemental Arrows-B # TODO Miscellaneous Mathematical Symbols-B # TODO Supplemental Mathematical Operators -- cgit v1.2.3-70-g09d2