summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-04-24 17:16:33 +0200
committerSébastien Dailly <sebastien@dailly.me>2023-04-24 17:16:33 +0200
commitc2c030153b1ef86ccdbbd9aacb88caef472f55d6 (patch)
tree6f7671b89e611f4b7fa643d63021b957a800f388
parentcdbf2fd0587131c1b9427bbf040e3f3f7405fa72 (diff)
Update
-rwxr-xr-xindex.html6
-rw-r--r--src/lib/repr/anatar.ml2
-rw-r--r--src/lib/repr/rousseau.ml16
-rw-r--r--src/lib/repr/telcontar.ml4
4 files changed, 18 insertions, 10 deletions
diff --git a/index.html b/index.html
index 2a51602..8b20d3d 100755
--- a/index.html
+++ b/index.html
@@ -31,6 +31,10 @@ fieldset label {
margin: 100px;
}
+ @font-face {
+ font-family: "Tengwar Telcontar" ;
+ src: url("tengtelc.ttf") format("truetype");
+ }
</style>
<body>
@@ -52,7 +56,7 @@ fieldset label {
<fieldset>
<p>
<label for="source">Entrée :</label>
- <input type="text" id="source" name="source">
+ <input type="text" id="source" name="source" class="telcontar">
</p>
<p>
<label for="output">Phonétique :</label>
diff --git a/src/lib/repr/anatar.ml b/src/lib/repr/anatar.ml
index cca6162..1bafbff 100644
--- a/src/lib/repr/anatar.ml
+++ b/src/lib/repr/anatar.ml
@@ -1,4 +1,4 @@
-module T = Tengwar
+module T = Rousseau
(** Glyph position for the diacritc *)
type position =
diff --git a/src/lib/repr/rousseau.ml b/src/lib/repr/rousseau.ml
index f9fde05..5fff1cf 100644
--- a/src/lib/repr/rousseau.ml
+++ b/src/lib/repr/rousseau.ml
@@ -82,13 +82,18 @@ let add_voyel_to_glyph
| `Below -> { g with tehta_below = Some v }
type 'a t =
- | Consonant of 'a consonant
- | Voyel of 'a voyel
- | Application of ('a t -> 'a t list)
+ | Consonant: 'a consonant -> 'a t
+ | Voyel: 'a voyel -> 'a t
+ | Application: ('a t -> 'a t list) -> 'a t
| Repr of string
- | Glyph of 'a glyph
+ | Glyph: 'a glyph -> 'a t
| Nothing
+let voyel
+ : position_type -> ('a -> string) -> 'a t
+ = fun position app ->
+ Voyel { position ; app }
+
let none = Nothing
let space s = Repr s
@@ -144,8 +149,7 @@ let fold
| [] ->
begin match init with
| None -> ()
- | Some glyph ->
- repr_glyph ~portant glyph buff
+ | Some glyph -> repr_glyph ~portant glyph buff
end
| hd::tl ->
match init, hd with
diff --git a/src/lib/repr/telcontar.ml b/src/lib/repr/telcontar.ml
index 219fa46..ad1f49d 100644
--- a/src/lib/repr/telcontar.ml
+++ b/src/lib/repr/telcontar.ml
@@ -1,4 +1,4 @@
-module T = Tengwar
+module T = Rousseau
(** Glyph position for the diacritc *)
type position = unit
@@ -12,7 +12,7 @@ let a' =
{ T.position = `Above
; T.app = fun () -> ""
}
-let a = T.Voyel a'
+let a = T.voyel `Above (fun () -> "")
let app_e = fun () -> ""
and app_eu = fun () -> ""