From c2c030153b1ef86ccdbbd9aacb88caef472f55d6 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 24 Apr 2023 17:16:33 +0200 Subject: Update --- index.html | 6 +++++- src/lib/repr/anatar.ml | 2 +- src/lib/repr/rousseau.ml | 16 ++++++++++------ src/lib/repr/telcontar.ml | 4 ++-- 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"); + } @@ -52,7 +56,7 @@ fieldset 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 () -> "" -- cgit v1.2.3