Add "is" cluster option to General Use
authorKris Kowal <kris.kowal@cixar.com>
Sun, 2 Sep 2012 21:00:03 +0000 (14:00 -0700)
committerKris Kowal <kris.kowal@cixar.com>
Sun, 2 Sep 2012 21:02:34 +0000 (14:02 -0700)
README.md
general-use.js

index 1ccac04..7bcf6ba 100644 (file)
--- a/README.md
+++ b/README.md
@@ -62,6 +62,11 @@ Using the Modules
                 the "ch" as in "Bach".  "cc" is transcribed as "ch" as
                 in "chew".
             -   `true`: "ch" is interpreted as the "ch" as in "chew".
+        -   `isHook`
+            -   `false`: by default, "is" is silme-nuquerna with an I
+                tehta.
+            -   `true`: "is" is a short carrier with an I tehta and S
+                hook.
 -   `tengwar/classical` transcribes phonetic latin letters into Tengwar
     Notation in the Classical mode, most commonly used for Quenya.
     -   `transcribe(text, options)` to Tengwar Annatar key bindings
index 08d5516..7e16665 100644 (file)
@@ -21,9 +21,12 @@ function makeOptions(options) {
         // or below.
         // false: by default, place a tilde above doubled nasals.
         // true: place the tilde below doubled nasals.
-        noAchLaut: options.noAchLaut
+        noAchLaut: options.noAchLaut,
         // false: "ch" is interpreted as ach-laut, "cc" as "ch" as in "chew"
         // true: "ch" is interpreted as "ch" as in chew
+        isHook: options.isHook
+        // false: "is" is silme with I tehta
+        // true: "is" is short carrier with S hook and I tehta
     };
 }
 
@@ -125,7 +128,13 @@ function parseColumn(callback, options, previous) {
         return parseTengwa(function (tengwa) {
             if (tengwa) {
                 if (tehta) {
-                    if (canAddAboveTengwa(tehta) && tengwa.canAddAbove(tehta)) {
+                    if (tengwa.tengwa === "silme" && tehta === "i" && options.isHook) {
+                        return callback([
+                            makeColumn("short-carrier")
+                            .addAbove("i")
+                            .addBelow("s")
+                        ]);
+                    } else if (canAddAboveTengwa(tehta) && tengwa.canAddAbove(tehta)) {
                         tengwa.addAbove(tehta);
                         return parseTengwaAnnotations(function (tengwa) {
                             return callback([tengwa]);