diff --git a/demo/src/index.ts b/demo/src/index.ts index 7db8431..6e9e07a 100644 --- a/demo/src/index.ts +++ b/demo/src/index.ts @@ -7,7 +7,7 @@ const DEBUG = false; const rotateGlyph = (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [1 - p[0], 1 - p[1]])); const upscaleGlyph = (g: Glyph) => - g.map((l: Line) => l.map((p: Vec) => [p[0] * 1.1 - 0.05, p[1] * 1.1 - 0.05])); + g.map((l: Line) => l.map((p: Vec) => [p[0] * 1.33 - 0.166, p[1] * 1.33 - 0.33])); const scaleGlyph = (g: Glyph) => g.map((l: Line) => @@ -19,7 +19,7 @@ const mirrorYGlyph = (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [1 - p[0], p[1]])); // font["ɜ"] = mirrorYGlyph(font["ɛ"]) -// alert(`ʖ: ${JSON.stringify(rotateGlyph(font["ʕ"]))},`); +// alert(`Ɣ: ${JSON.stringify(upscaleGlyph(font["ɣ"]))},`); for (let l = 0; l < letters.length; l++) { if (font[letters[l]] === undefined) { diff --git a/src/uppercase/base.ts b/src/uppercase/base.ts index e605dd6..9e63b9a 100644 --- a/src/uppercase/base.ts +++ b/src/uppercase/base.ts @@ -186,6 +186,40 @@ const base = { [0.55, 0.557], ], ], + Ǝ: [ + [ + [0.15, 0.271], + [0.85, 0.271], + [0.85, 0.7], + [0.15, 0.7], + ], + [ + [0.85, 0.557], + [0.45, 0.557], + ], + ], + Ə: [ + [ + [0.85, 0.429], + [0.15, 0.429], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.271], + [0.15, 0.271], + ], + ], + Ɛ: [ + [ + [0.85, 0.271], + [0.15, 0.271], + [0.15, 0.7], + [0.85, 0.7], + ], + [ + [0.5, 0.4], + [0.15, 0.4], + ], + ], F: [ [ [0.85, 0.271], @@ -197,6 +231,21 @@ const base = { [0.55, 0.557], ], ], + Ƒ: [ + [ + [0.25, 0.789], + [0.3, 0.836], + [0.325, 0.843], + [0.35, 0.836], + [0.4, 0.789], + [0.4, 0.271], + [0.85, 0.271], + ], + [ + [0.15, 0.557], + [0.55, 0.557], + ], + ], G: [ [ [0.85, 0.271], @@ -207,6 +256,42 @@ const base = { [0.5, 0.557], ], ], + Ǥ: [ + [ + [0.75, 0.271], + [0.15, 0.271], + [0.15, 0.7], + [0.75, 0.7], + [0.75, 0.557], + [0.45, 0.557], + ], + [ + [0.55, 0.63], + [0.85, 0.63], + ], + ], + Ɠ: [ + [ + [0.85, 0.15], + [0.83, 0.15], + [0.8, 0.18], + [0.8, 0.271], + [0.15, 0.271], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.557], + [0.5, 0.557], + ], + ], + Ɣ: [ + [ + [0.2995, 0.271], + [0.5655, 0.6954], + [0.499, 0.7433], + [0.4325, 0.6954], + [0.6985, 0.271], + ], + ], H: [ [ [0.15, 0.271], @@ -400,418 +485,5 @@ const base = { ], ], } as Font; -/* -const base = { - A: [ - [ - [0.85, 0.7], - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - ], - [ - [0.15, 0.5], - [0.85, 0.5], - ], - ], - Æ: [ - [ - [0.5, 0.7], - [0.5, 0.1], - [0.15, 0.1], - [0.15, 0.7], - ], - [ - [0.15, 0.5], - [0.6, 0.5], - ], - [ - [0.85, 0.1], - [0.5, 0.1], - [0.5, 0.7], - [0.85, 0.7], - ], - ], - B: [ - [ - [0.6, 0.5], - [0.6, 0.1], - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - [0.85, 0.5], - [0.15, 0.5], - ], - ], - Ƀ: [ - [ - [0.6, 0.5], - [0.6, 0.1], - [0.25, 0.1], - [0.25, 0.7], - [0.85, 0.7], - [0.85, 0.5], - [0.25, 0.5], - ], - [ - [0.15, 0.6], - [0.35, 0.6], - ], - ], - Ɓ: [ - [ - [0.6, 0.5], - [0.6, 0.1], - [0.25, 0.1], - [0.25, 0.7], - [0.85, 0.7], - [0.85, 0.5], - [0.25, 0.5], - ], - [ - [0.3, 0.1], - [0.15, 0.1], - [0.15, 0.3], - ], - ], - Ƃ: [ - [ - [0.6, 0.1], - [0.25, 0.1], - [0.25, 0.7], - [0.85, 0.7], - [0.85, 0.5], - [0.25, 0.5], - ], - ], - - C: [ - [ - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - ], - ], - Ƈ: [ - [ - [0.85, 0.1], - [0.8, 0.11], - [0.75, 0.15], - [0.75, 0.1], - [0.25, 0.1], - [0.25, 0.7], - [0.75, 0.7], - ], - ], - - D: [ - [ - [0.15, 0.1], - [0.85, 0.1], - [0.85, 0.7], - [0.15, 0.7], - ], - [ - [0.3, 0.1], - [0.3, 0.7], - ], - ], - Đ: [ - [ - [0.25, 0.1], - [0.85, 0.1], - [0.85, 0.7], - [0.25, 0.7], - ], - [ - [0.3, 0.1], - [0.3, 0.7], - ], - [ - [0.2, 0.45], - [0.4, 0.45], - ], - ], - DZ: [ - [ - [0.15, 0.1], - [0.45, 0.1], - [0.45, 0.7], - [0.15, 0.7], - ], - [ - [0.2, 0.1], - [0.2, 0.7], - ], - [ - [0.55, 0.1], - [0.85, 0.1], - [0.55, 0.7], - [0.85, 0.7], - ], - ], - Ɗ: [ - [ - [0.15, 0.3], - [0.15, 0.1], - [0.85, 0.1], - [0.85, 0.7], - [0.25, 0.7], - ], - [ - [0.3, 0.1], - [0.3, 0.7], - ], - ], - Ƌ: [ - [ - [0.15, 0.1], - [0.85, 0.1], - [0.85, 0.725], - ], - [ - [0.85, 0.7], - [0.15, 0.7], - [0.15, 0.3], - [0.85, 0.3], - ], - ], - - E: [ - [ - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - ], - [ - [0.15, 0.5], - [0.55, 0.5], - ], - ], - F: [ - [ - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - ], - [ - [0.15, 0.5], - [0.55, 0.5], - ], - ], - G: [ - [ - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - [0.85, 0.5], - [0.5, 0.5], - ], - ], - H: [ - [ - [0.15, 0.1], - [0.15, 0.7], - ], - [ - [0.15, 0.5], - [0.85, 0.5], - ], - [ - [0.85, 0.1], - [0.85, 0.7], - ], - ], - I: [ - [ - [0.15, 0.1], - [0.85, 0.1], - ], - [ - [0.15, 0.7], - [0.85, 0.7], - ], - [ - [0.5, 0.1], - [0.5, 0.7], - ], - ], - J: [ - [ - [0.4, 0.1], - [0.85, 0.1], - ], - [ - [0.6, 0.1], - [0.6, 0.7], - [0.15, 0.7], - [0.15, 0.6], - ], - ], - K: [ - [ - [0.15, 0.1], - [0.15, 0.7], - ], - [ - [0.85, 0.1], - [0.15, 0.5], - [0.85, 0.7], - ], - ], - L: [ - [ - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - ], - ], - M: [ - [ - [0.15, 0.7], - [0.15, 0.1], - [0.5, 0.5], - [0.85, 0.1], - [0.85, 0.7], - ], - ], - N: [ - [ - [0.15, 0.7], - [0.15, 0.1], - [0.85, 0.7], - [0.85, 0.1], - ], - ], - O: [ - [ - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - [0.85, 0.1], - [0.15, 0.1], - ], - ], - P: [ - [ - [0.15, 0.5], - [0.85, 0.5], - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - ], - ], - Q: [ - [ - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - [0.85, 0.1], - [0.15, 0.1], - ], - [ - [0.6, 0.6], - [0.95, 0.75], - ], - ], - R: [ - [ - [0.15, 0.5], - [0.85, 0.5], - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.7], - ], - [ - [0.15, 0.5], - [0.85, 0.7], - ], - ], - S: [ - [ - [0.85, 0.1], - [0.15, 0.1], - [0.15, 0.5], - [0.85, 0.5], - [0.85, 0.7], - [0.15, 0.7], - ], - ], - T: [ - [ - [0.15, 0.1], - [0.85, 0.1], - ], - [ - [0.5, 0.1], - [0.5, 0.7], - ], - ], - U: [ - [ - [0.15, 0.1], - [0.15, 0.7], - [0.85, 0.7], - [0.85, 0.1], - ], - ], - V: [ - [ - [0.15, 0.1], - [0.5, 0.7], - [0.85, 0.1], - ], - ], - W: [ - [ - [0.15, 0.1], - [0.3, 0.7], - [0.5, 0.5], - [0.7, 0.7], - [0.85, 0.1], - ], - ], - X: [ - [ - [0.15, 0.1], - [0.85, 0.7], - ], - [ - [0.15, 0.7], - [0.85, 0.1], - ], - ], - Y: [ - [ - [0.15, 0.1], - [0.5, 0.5], - [0.85, 0.1], - ], - [ - [0.5, 0.5], - [0.5, 0.7], - ], - ], - Z: [ - [ - [0.15, 0.1], - [0.85, 0.1], - [0.15, 0.7], - [0.85, 0.7], - ], - ], -} as Font; -const keys = Object.keys(base); -const r = (x: number) => Math.round(x * 1000) / 1000; -const remapped = {} as Font; -keys.forEach((k: keyof Font) => { - const g = base[k].map((l) => l.map((v) => [v[0], r(v[1] / 1.4 + 0.2)])); - remapped[k] = g; -}); -console.log(JSON.stringify(remapped)); -*/ export { base }; diff --git a/src/uppercase/diaBaseAssociation.ts b/src/uppercase/diaBaseAssociation.ts index d75c627..dfb327c 100644 --- a/src/uppercase/diaBaseAssociation.ts +++ b/src/uppercase/diaBaseAssociation.ts @@ -60,6 +60,7 @@ const diaBaseAssociation = { Ð: ["Đ", []], Ɖ: ["Đ", []], + // E É: ["E", ["ct"]], È: ["E", ["gr"]], Ĕ: ["E", ["br"]], @@ -67,6 +68,39 @@ const diaBaseAssociation = { Ế: ["E", ["cr", "ct"]], Ề: ["E", ["cr", "gr"]], Ễ: ["E", ["cr", "tl"]], + Ể: ["E", ["cr", "ha"]], + Ě: ["E", ["hc"]], + Ë: ["E", ["dr"]], + Ẽ: ["E", ["tl"]], + Ė: ["E", ["da"]], + Ȩ: ["E", ["cd"]], + Ḝ: ["E", ["cd", "br"]], + Ę: ["E", ["gnk"]], + Ē: ["E", ["mc"]], + Ḗ: ["E", ["mc", "ct"]], + Ḕ: ["E", ["mc", "gr"]], + Ẻ: ["E", ["ha"]], + Ȅ: ["E", ["gr", "gr"]], + Ȇ: ["E", ["bri"]], + Ẹ: ["E", ["db"]], + Ệ: ["E", ["db", "cr"]], + Ḙ: ["E", ["crb"]], + Ḛ: ["E", ["tlb"]], + Ɇ: ["E", ["brd"]], + + // F + Ḟ: ["F", ["da"]], + + // G + Ǵ: ["G", ["ct"]], + Ğ: ["G", ["br"]], + Ĝ: ["G", ["cr"]], + Ǧ: ["G", ["hc"]], + Ġ: ["G", ["da"]], + Ģ: ["G", ["cm"]], + Ḡ: ["G", ["mc"]], + //Ɠ + } as ExtendedTable; export { diaBaseAssociation };