From 7e8263051c6f04697c4a99efcbe8a77471121c3f Mon Sep 17 00:00:00 2001 From: Nicolas Lebrun Date: Sun, 5 May 2024 17:59:26 +0200 Subject: [PATCH] i j k diacritics --- demo/src/index.ts | 6 +- src/glyphs/diacritics.ts | 12 +- src/glyphs/lowercase/base.ts | 401 ++++++++++++++++++++- src/glyphs/lowercase/diaBaseAssociation.ts | 49 ++- 4 files changed, 427 insertions(+), 41 deletions(-) diff --git a/demo/src/index.ts b/demo/src/index.ts index 9dd4f42..6e5e608 100644 --- a/demo/src/index.ts +++ b/demo/src/index.ts @@ -51,7 +51,7 @@ const mirrorYGlyph = (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [1 - p[0], p[1]])); // font["ɜ"] = mirrorYGlyph(font["ɛ"]) -console.log(JSON.stringify(scaleGlyph(font["H"]))); +console.log(JSON.stringify(scaleGlyph(font["L"]))); for (let l = 0; l < lowercase.length; l++) { if (font[lowercase[l]] === undefined) { @@ -76,7 +76,7 @@ const update = () => { let height = window.innerHeight; const userInput = input.value !== textAtLaunch ? input.value : glyphKeys, text = userInput.split("") as string[], - fontScale = parseFloat(inputSize.value), + fontScale = 0.2, //parseFloat(inputSize.value), width = window.innerWidth - 40, baseSize = Math.max( 16, @@ -141,7 +141,7 @@ const init = () => { inputSize.type = "range"; inputSize.min = "0.05"; - inputSize.value = "0.07"; + inputSize.value = "0.17"; inputSize.max = "0.2"; inputSize.step = "0.01"; inputSize.addEventListener("change", update); diff --git a/src/glyphs/diacritics.ts b/src/glyphs/diacritics.ts index 7b44b50..15e0017 100644 --- a/src/glyphs/diacritics.ts +++ b/src/glyphs/diacritics.ts @@ -7,15 +7,15 @@ const diacritics = { // grave accent gr: [ [ - [0.4, 0.1], - [0.6, 0.15], + [0.45, 0.1], + [0.55, 0.15], ], ], // acute accent ct: [ [ - [0.4, 0.15], - [0.6, 0.1], + [0.45, 0.15], + [0.55, 0.1], ], ], // circumflex accent @@ -99,7 +99,7 @@ const diacritics = { [0.6, 0.2], ], ], - // haček or caron + // haček hc: [ [ [0.4, 0.1], @@ -213,7 +213,7 @@ const diacritics = { [0.85, 0.3], [0.85, 0.25], [0.90, 0.2], - ], + ] , ], // barred (kind of /) brd: [ diff --git a/src/glyphs/lowercase/base.ts b/src/glyphs/lowercase/base.ts index ed43d33..9a20ff3 100644 --- a/src/glyphs/lowercase/base.ts +++ b/src/glyphs/lowercase/base.ts @@ -677,7 +677,7 @@ const base = { [0.73, 0.628], ], ], - ƕ: [ + ƕ: [ [ [0.15, 0.7], [0.15, 0.1], @@ -687,7 +687,7 @@ const base = { [0.5, 0.3], [0.5, 0.7], [0.85, 0.7], - [0.85, 0.3] + [0.85, 0.3], ], ], ɦ: [ @@ -695,7 +695,7 @@ const base = { [0.15, 0.7], [0.15, 0.2], [0.16, 0.145], - [0.20, 0.1] + [0.2, 0.1], ], [ [0.125, 0.3], @@ -703,24 +703,28 @@ const base = { [0.85, 0.7], ], ], - ɧ: [ + ɧ: [ [ [0.15, 0.7], [0.15, 0.2], [0.16, 0.145], - [0.20, 0.1] + [0.2, 0.1], ], [ [0.125, 0.3], [0.85, 0.3], [0.85, 0.8], [0.83, 0.85], - [0.75, 0.9] + [0.75, 0.9], ], ], - i_: [ - [ + i: [ + [ + [0.5, 0.1], + [0.5, 0.15], + ], + [ [0.15, 0.3], [0.5, 0.3], [0.5, 0.7], @@ -729,10 +733,64 @@ const base = { [ [0.15, 0.7], [0.85, 0.7], - - ] + ], ], - i: [ + ij: [ + [ + [0.35, 0.1], + [0.35, 0.15], + ], + [ + [0.15, 0.3], + [0.35, 0.3], + [0.35, 0.7], + [0.4, 0.7], + ], + [ + [0.35, 0.7], + [0.35, 0.7], + ], + [ + [0.65, 0.1], + [0.65, 0.15], + ], + [ + [0.5, 0.3], + [0.8, 0.3], + ], + [ + [0.65, 0.3], + [0.65, 0.9], + [0.35, 0.9], + ], + ], + ı: [ + [ + [0.15, 0.3], + [0.5, 0.3], + [0.5, 0.7], + [0.65, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + ], + ɪ: [ + [ + [0.265, 0.3], + [0.73, 0.3], + ], + [ + [0.265, 0.628], + [0.73, 0.628], + ], + [ + [0.496, 0.3], + [0.496, 0.628], + ], + ], + ɨ: [ [ [0.5, 0.1], [0.5, 0.15], @@ -746,9 +804,22 @@ const base = { [ [0.15, 0.7], [0.85, 0.7], - - ] + ], + [ + [0.35, 0.45], + [0.65, 0.45], + ], ], + ɩ: [ + [ + [0.5, 0.3], + [0.5, 0.6], + [0.55, 0.65], + [0.6, 0.68], + [0.65, 0.7], + ], + ], + j: [ [ [0.6, 0.1], @@ -764,6 +835,83 @@ const base = { [0.15, 0.9], ], ], + ȷ: [ + [ + [0.15, 0.3], + [0.85, 0.3], + ], + [ + [0.6, 0.3], + [0.6, 0.9], + [0.15, 0.9], + ], + ], + ɉ: [ + [ + [0.6, 0.1], + [0.6, 0.15], + ], + [ + [0.15, 0.3], + [0.85, 0.3], + ], + [ + [0.6, 0.3], + [0.6, 0.9], + [0.15, 0.9], + ], + [ + [0.45, 0.45], + [0.75, 0.45], + ], + ], + ʝ: [ + [ + [0.6, 0.1], + [0.6, 0.15], + ], + [ + [0.15, 0.3], + [0.85, 0.3], + ], + [ + [0.6, 0.3], + [0.6, 0.9], + [0.15, 0.9], + [0.15, 0.7], + [0.75, 0.7], + ], + ], + ɟ: [ + [ + [0.15, 0.3], + [0.85, 0.3], + ], + [ + [0.6, 0.3], + [0.6, 0.9], + [0.15, 0.9], + ], + [ + [0.45, 0.45], + [0.75, 0.45], + ], + ], + ʄ: [ + [ + [0.75, 0.15], + [0.7, 0.15], + [0.64, 0.18], + [0.6, 0.25], + [0.6, 0.9], + [0.15, 0.9], + ], + [ + [0.45, 0.45], + [0.75, 0.45], + ], + ], + k: [ [ [0.15, 0.7], @@ -775,14 +923,237 @@ const base = { [0.85, 0.7], ], ], + ƙ: [ + [ + [0.15, 0.7], + [0.15, 0.3], + [0.17, 0.2], + [0.23, 0.12], + [0.3, 0.1], + ], + [ + [0.85, 0.3], + [0.15, 0.5], + [0.85, 0.7], + ], + ], + ʞ: [ + [ + [0.85, 0.3], + [0.85, 0.9], + ], + [ + [0.15, 0.7], + [0.85, 0.5], + [0.15, 0.3], + ], + ], l: [ [ [0.15, 0.1], - [0.45, 0.1], - [0.45, 0.7], + [0.4, 0.1], + [0.4, 0.7], + ], + [ + [0.15, 0.7], [0.85, 0.7], ], ], + ł: [ + [ + [0.15, 0.1], + [0.4, 0.1], + [0.4, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.25, 0.5], + [0.55, 0.4], + ], + ], + ŀ: [ + [ + [0.15, 0.1], + [0.4, 0.1], + [0.4, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.6, 0.425], + [0.6, 0.475], + ], + ], + lj: [ + [ + [0.15, 0.1], + [0.35, 0.1], + [0.35, 0.7], + ], + [ + [0.15, 0.7], + [0.55, 0.7], + ], + + [ + [0.65, 0.1], + [0.65, 0.15], + ], + [ + [0.5, 0.3], + [0.85, 0.3], + ], + [ + [0.65, 0.3], + [0.65, 0.9], + [0.5, 0.9], + ], + ], + ỻ: [ + [ + [0.35, 0.1], + [0.35, 0.7], + ], + [ + [0.65, 0.1], + [0.65, 0.7], + ], + [ + [0.25, 0.15], + [0.75, 0.15], + ], + ], + ʪ: [ + [ + [0.15, 0.1], + [0.35, 0.1], + [0.35, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.5], + [0.55, 0.5], + [0.55, 0.2], + [0.85, 0.2], + ], + ], + ʫ: [ + [ + [0.15, 0.1], + [0.35, 0.1], + [0.35, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.5, 0.2], + [0.85, 0.2], + [0.5, 0.7], + ], + ], + ʟ: [ + [ + [0.265, 0.3], + [0.265, 0.628], + [0.73, 0.628], + ], + ], + ƚ: [ + [ + [0.15, 0.1], + [0.4, 0.1], + [0.4, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.25, 0.45], + [0.55, 0.45], + ], + ], + ɫ: [ + [ + [0.15, 0.1], + [0.4, 0.1], + [0.4, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.25, 0.5], + [0.25, 0.4], + [0.55, 0.5], + [0.55, 0.4], + ], + ], + ɬ: [ + [ + [0.15, 0.1], + [0.4, 0.1], + [0.4, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.4, 0.45], + [0.4, 0.4], + [0.25, 0.4], + [0.25, 0.55], + [0.75, 0.55], + ], + ], + ɭ: [ + [ + [0.15, 0.1], + [0.4, 0.1], + [0.4, 0.9], + [0.5, 0.9], + ], + ], + ȴ: [ + [ + [0.5, 0.1], + [0.5, 0.9], + [0.75, 0.9], + [0.75, 0.7], + [0.3, 0.8], + [0.3, 0.9], + ], + ], + ɮ: [ + [ + [0.15, 0.1], + [0.35, 0.1], + [0.35, 0.7], + ], + [ + [0.15, 0.7], + [0.5, 0.7], + ], + [ + [0.35, 0.3], + [0.85, 0.3], + [0.55, 0.55], + [0.85, 0.7], + [0.7, 0.9], + [0.5, 0.8], + ], + ], + m: [ [ [0.15, 0.7], diff --git a/src/glyphs/lowercase/diaBaseAssociation.ts b/src/glyphs/lowercase/diaBaseAssociation.ts index 6b36611..4bdbb60 100644 --- a/src/glyphs/lowercase/diaBaseAssociation.ts +++ b/src/glyphs/lowercase/diaBaseAssociation.ts @@ -109,29 +109,44 @@ const diaBaseAssociation = { ẖ: ["h", ["lb"]], // i - í: ["i_", ["ct"]], - ì: ["i_", ["gr"]], - ĭ: ["i_", ["br"]], - î: ["i_", ["cr"]], - ǐ: ["i_", ["hc"]], - ï: ["i_", ["dr"]], - ḯ: ["i_", ["ct", "dr"]], - ĩ: ["i_", ["tl"]], + í: ["ı", ["ct"]], + ì: ["ı", ["gr"]], + ĭ: ["ı", ["br"]], + î: ["ı", ["cr"]], + ǐ: ["ı", ["hc"]], + ï: ["ı", ["dr"]], + ḯ: ["ı", ["ct", "dr"]], + ĩ: ["ı", ["tl"]], į: ["i", ["gnk"]], - ī: ["i_", ["mc"]], - ỉ: ["i_", ["ha"]], - ȉ: ["i_", ["gr", "gr"]], - ȋ: ["i_", ["bri"]], + ī: ["ı", ["mc"]], + ỉ: ["ı", ["ha"]], + ȉ: ["ı", ["gr", "gr"]], + ȋ: ["ı", ["bri"]], ị: ["i", ["db"]], ḭ: ["i", ["tlb"]], - - - - - //Ỉ: ["i", ["ha"]], //Ị: ["i", ["db"]], + // j + ĵ: ["ȷ", ["cr"]], + ǰ: ["ȷ", ["hc"]], + + // k + ḱ: ["k", ["ct"]], + ǩ: ["k", ["hc"]], + ķ: ["k", ["cdr"]], + ḳ: ["k", ["db"]], + ḵ: ["k", ["lb"]], + + // l + ĺ: ["l", ["ct"]], + ľ: ["l", ["hr"]], + ļ: ["l", ["cd"]], + ḷ: ["l", ["db"]], + ḹ: ["l", ["db", "mc"]], + ḽ: ["l", ["crb"]], + ḻ: ["l", ["lb"]], + // o ọ: ["o", ["db"]], ỏ: ["o", ["ha"]],