From 42899a18aa15c838282cbff7fe4fcba89c9388b2 Mon Sep 17 00:00:00 2001 From: Nicolas Lebrun Date: Sat, 4 May 2024 23:26:31 +0200 Subject: [PATCH] larger glyphs --- demo/src/index.ts | 4 +- src/glyphs/diacritics.ts | 43 +- src/glyphs/lowercase/base.ts | 489 +++++++++++---------- src/glyphs/lowercase/diaBaseAssociation.ts | 14 +- src/glyphs/lowercase/index.ts | 25 +- src/glyphs/number.ts | 225 +++++----- src/glyphs/uppercase.ts | 222 +++++----- 7 files changed, 539 insertions(+), 483 deletions(-) diff --git a/demo/src/index.ts b/demo/src/index.ts index 15506a4..8304417 100644 --- a/demo/src/index.ts +++ b/demo/src/index.ts @@ -18,7 +18,7 @@ const rotateGlyph = (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [1 - p[0] const scaleGlyph = (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [0.25 + p[0] * 0.5, 0.25 + p[1] * 0.5])) // font["ʙ"] = scaleGlyph(font["B"]) -console.log(JSON.stringify(scaleGlyph(font['6']))) +// console.log(JSON.stringify(scaleGlyph(font['6']))) for (let l = 0; l < lowercase.length; l++) { if (font[lowercase[l]] === undefined) { @@ -47,7 +47,7 @@ const update = () => { fontScale = parseFloat(inputSize.value), width = window.innerWidth - 40, baseSize = Math.max(16, Math.min(Math.floor(Math.hypot(width, height) * fontScale), 264)), - textSize = [baseSize, baseSize * 1.2], + textSize = [baseSize, baseSize], charPerLine = Math.floor(width / textSize[0]) - 2, nbLines = Math.ceil(text.length / charPerLine), margin = [ diff --git a/src/glyphs/diacritics.ts b/src/glyphs/diacritics.ts index 8d929ee..2c2f87e 100644 --- a/src/glyphs/diacritics.ts +++ b/src/glyphs/diacritics.ts @@ -128,20 +128,20 @@ const diacritics = { // cedilla left cdl: [ [ - [0.25, 0.7], - [0.25, 0.75], - [0.3, 0.75], - [0.3, 0.8], + [0.15, 0.7], + [0.15, 0.75], + [0.2, 0.75], + [0.2, 0.8], [0.2, 0.8], ], ], // cedilla right cdr: [ [ - [0.75, 0.7], - [0.75, 0.75], - [0.8, 0.75], - [0.8, 0.8], + [0.85, 0.7], + [0.85, 0.75], + [0.9, 0.75], + [0.9, 0.8], [0.7, 0.8], ], ], @@ -178,9 +178,9 @@ const diacritics = { // hook bottom right hbr: [ [ - [0.75, 0.725], - [0.75, 0.85], - [0.85, 0.9] + [0.85, 0.725], + [0.85, 0.85], + [0.9, 0.9] ] ], // line below @@ -193,16 +193,17 @@ const diacritics = { // horn hr: [ [ - [0.8, 0.3], - [0.85, 0.25], - [0.85, 0.2], + [0.85, 0.3], + [0.9, 0.25], + [0.9, 0.2], ], ], + // cross (right) crs: [ [ - [0.8, 0.3], - [0.8, 0.25], - [0.85, 0.2], + [0.85, 0.3], + [0.85, 0.25], + [0.90, 0.2], ], ], // barred (kind of /) @@ -212,6 +213,14 @@ const diacritics = { [0.35, 0.8], ], ], + // ogonek + gnk: [ + [ + [0.85, 0.7], + [0.75, 0.75], + [0.85, 0.8] + ] + ] } as Font; export default diacritics; diff --git a/src/glyphs/lowercase/base.ts b/src/glyphs/lowercase/base.ts index 76aa486..8954c79 100644 --- a/src/glyphs/lowercase/base.ts +++ b/src/glyphs/lowercase/base.ts @@ -6,78 +6,78 @@ import { type Font } from "../../type"; const base = { a: [ [ - [0.8, 0.5], - [0.2, 0.5], - [0.2, 0.7], - [0.8, 0.7], + [0.85, 0.5], + [0.15, 0.5], + [0.15, 0.7], + [0.85, 0.7], ], [ - [0.8, 0.725], - [0.8, 0.3], + [0.85, 0.725], + [0.85, 0.3], [0.3, 0.3], ], ], æ: [ [ [0.5, 0.3], - [0.8, 0.3], - [0.8, 0.5], - [0.2, 0.5], - [0.2, 0.7], + [0.85, 0.3], + [0.85, 0.5], + [0.15, 0.5], + [0.15, 0.7], [0.5, 0.7], [0.5, 0.3], - [0.3, 0.3], + [0.15, 0.3], ], [ [0.5, 0.7], - [0.8, 0.7], + [0.85, 0.7], ], ], ɐ: [ [ - [0.2, 0.5], - [0.8, 0.5], - [0.8, 0.3], - [0.2, 0.3], - [0.2, 0.7], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.3], + [0.15, 0.3], + [0.15, 0.7], [0.7, 0.7], ], ], ɑ: [ [ - [0.8, 0.5], - [0.2, 0.5], - [0.2, 0.7], - [0.8, 0.7], + [0.85, 0.5], + [0.15, 0.5], + [0.15, 0.7], + [0.85, 0.7], ], [ - [0.8, 0.725], - [0.8, 0.3], + [0.85, 0.725], + [0.85, 0.3], ], ], ɒ: [ [ - [0.2, 0.5], - [0.8, 0.5], - [0.8, 0.3], - [0.2, 0.3], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.3], + [0.15, 0.3], ], [ - [0.2, 0.275], - [0.2, 0.7], + [0.15, 0.275], + [0.15, 0.7], ], ], b: [ [ - [0.25, 0.1], - [0.25, 0.725], + [0.15, 0.1], + [0.15, 0.725], ], [ - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.3], - [0.25, 0.3], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.3], + [0.15, 0.3], ], ], ʙ: [ @@ -93,111 +93,110 @@ const base = { ], ƀ: [ [ - [0.25, 0.1], - [0.25, 0.725], + [0.15, 0.1], + [0.15, 0.725], ], [ - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.3], - [0.25, 0.3], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.3], + [0.15, 0.3], ], [ - [0.15, 0.165], - [0.35, 0.165], + [0.05, 0.165], + [0.25, 0.165], ], ], ɓ: [ [ [0.35, 0.1], - [0.25, 0.1], - [0.25, 0.725], + [0.15, 0.1], + [0.15, 0.725], ], [ - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.3], - [0.25, 0.3], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.3], + [0.15, 0.3], ], ], ƃ: [ [ - [0.75, 0.1], - [0.25, 0.1], - [0.25, 0.725], + [0.85, 0.1], + [0.15, 0.1], + [0.15, 0.725], ], [ - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.3], - [0.25, 0.3], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.3], + [0.15, 0.3], ], ], c: [ [ - [0.8, 0.3], - [0.2, 0.3], - [0.2, 0.7], - [0.8, 0.7], + [0.85, 0.3], + [0.15, 0.3], + [0.15, 0.7], + [0.85, 0.7], ], - ], + ], ɕ: [ [ - [0.8, 0.3], - [0.2, 0.3], - [0.2, 0.7], - [0.8, 0.7], + [0.85, 0.3], + [0.15, 0.3], + [0.15, 0.7], + [0.85, 0.7], [0.5, 0.55], [0.15, 0.75], ], ], - d: [ [ - [0.75, 0.1], - [0.75, 0.725], + [0.85, 0.1], + [0.85, 0.725], ], [ - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3], - [0.75, 0.3], + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], ], ], đ: [ [ - [0.75, 0.1], - [0.75, 0.725], + [0.85, 0.1], + [0.85, 0.725], ], [ - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3], - [0.75, 0.3], + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], ], [ - [0.65, 0.165], - [0.85, 0.165], + [0.75, 0.165], + [0.95, 0.165], ], ], ð: [ [ [0.5, 0.1], - [0.75, 0.3], - [0.75, 0.725], + [0.85, 0.3], + [0.85, 0.725], ], [ - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3], - [0.75, 0.3], + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], ], [ [0.5, 0.2], - [0.65, 0.1] - ] + [0.65, 0.1], + ], ], ȸ: [ [ @@ -205,12 +204,12 @@ const base = { [0.5, 0.725], ], [ - [0.25, 0.3], - [0.75, 0.3], - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3] - ] + [0.15, 0.3], + [0.85, 0.3], + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + ], ], dz: [ [ @@ -227,8 +226,8 @@ const base = { [0.55, 0.3], [0.85, 0.3], [0.55, 0.7], - [0.85, 0.7] - ] + [0.85, 0.7], + ], ], ʣ: [ [ @@ -245,10 +244,10 @@ const base = { [0.5, 0.3], [0.85, 0.3], [0.5, 0.7], - [0.85, 0.7] - ] + [0.85, 0.7], + ], ], - dž: [ + dž: [ [ [0.45, 0.1], [0.45, 0.725], @@ -263,13 +262,13 @@ const base = { [0.55, 0.3], [0.85, 0.3], [0.55, 0.7], - [0.85, 0.7] + [0.85, 0.7], ], [ [0.55, 0.1], [0.7, 0.2], - [0.85, 0.1] - ] + [0.85, 0.1], + ], ], ʥ: [ [ @@ -287,9 +286,9 @@ const base = { [0.85, 0.3], [0.5, 0.7], [0.85, 0.7], - [0.75, 0.6], - [0.55, 0.8] - ] + [0.85, 0.6], + [0.65, 0.8], + ], ], ʤ: [ [ @@ -301,87 +300,118 @@ const base = { [0.15, 0.7], [0.15, 0.3], [0.5, 0.3], - ],[ + ], + [ [0.5, 0.3], [0.85, 0.3], [0.55, 0.55], [0.85, 0.7], [0.7, 0.9], - [0.5, 0.8] - ] + [0.5, 0.8], + ], ], ɗ: [ [ - [0.85, 0.1], - [0.8, 0.1], - [0.75, 0.15], - [0.75, 0.725], + [0.95, 0.1], + [0.9, 0.1], + [0.85, 0.15], + [0.85, 0.725], ], [ - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3], - [0.75, 0.3], - ], + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], + ], ], ƌ: [ [ - [0.25, 0.15], - [0.75, 0.15], - [0.75, 0.725], + [0.15, 0.15], + [0.15, 0.15], + [0.85, 0.725], ], [ - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3], - [0.75, 0.3], - - ] + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], + ], + ], + ȡ: [ + [ + [0.65, 0.1], + [0.65, 0.725], + ], + [ + [0.65, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.65, 0.3], + ], + [ + [0.5, 0.7], + [0.85, 0.7], + [0.85, 0.6], + [0.65, 0.8], + ], + ], + ẟ: [ + [ + + [0.75, 0.15], + [0.5, 0.1], + [0.3, 0.1], + [0.15, 0.15], + [0.85, 0.5], + [0.5, 0.7], + [0.15, 0.5], + [0.5, 0.325] + ], ], e: [ [ - [0.2, 0.5], - [0.8, 0.5], - [0.8, 0.3], - [0.2, 0.3], - [0.2, 0.7], - [0.8, 0.7], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.3], + [0.15, 0.3], + [0.15, 0.7], + [0.85, 0.7], ], ], f: [ [ - [0.2, 0.5], + [0.15, 0.5], [0.7, 0.5], ], [ - [0.4, 0.7], - [0.4, 0.2], - [0.7, 0.2], + [0.3, 0.7], + [0.3, 0.2], + [0.85, 0.2], ], ], g: [ [ - [0.75, 0.7], - [0.25, 0.7], - [0.25, 0.3], - [0.75, 0.3], + [0.85, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], ], [ - [0.75, 0.275], - [0.75, 0.9], + [0.85, 0.275], + [0.85, 0.9], [0.5, 0.9], ], ], h: [ [ - [0.25, 0.7], - [0.25, 0.1], + [0.15, 0.7], + [0.15, 0.1], ], [ - [0.225, 0.3], - [0.75, 0.3], - [0.75, 0.7], + [0.125, 0.3], + [0.85, 0.3], + [0.85, 0.7], ], ], i: [ @@ -390,8 +420,10 @@ const base = { [0.5, 0.15], ], [ + [0.15, 0.3], [0.5, 0.3], [0.5, 0.7], + [0.65, 0.7], ], ], j: [ @@ -400,43 +432,43 @@ const base = { [0.6, 0.15], ], [ - [0.45, 0.3], - [0.75, 0.3], + [0.15, 0.3], + [0.85, 0.3], ], [ [0.6, 0.3], [0.6, 0.9], - [0.3, 0.9], + [0.15, 0.9], ], ], k: [ [ - [0.3, 0.7], - [0.3, 0.1], + [0.15, 0.7], + [0.15, 0.1], ], [ - [0.8, 0.3], - [0.3, 0.5], - [0.8, 0.7], + [0.85, 0.3], + [0.15, 0.5], + [0.85, 0.7], ], ], l: [ [ - [0.4, 0.1], - [0.5, 0.1], - [0.5, 0.7], - [0.6, 0.7], + [0.15, 0.1], + [0.45, 0.1], + [0.45, 0.7], + [0.85, 0.7], ], ], m: [ [ - [0.2, 0.7], - [0.2, 0.275], + [0.15, 0.7], + [0.15, 0.275], ], [ - [0.2, 0.3], - [0.8, 0.3], - [0.8, 0.7], + [0.15, 0.3], + [0.85, 0.3], + [0.85, 0.7], ], [ [0.5, 0.3], @@ -445,100 +477,101 @@ const base = { ], n: [ [ - [0.2, 0.7], - [0.2, 0.275], + [0.15, 0.7], + [0.15, 0.275], ], [ - [0.2, 0.3], - [0.8, 0.3], - [0.8, 0.7], + [0.15, 0.3], + [0.85, 0.3], + [0.85, 0.7], ], ], o: [ [ - [0.2, 0.7], - [0.2, 0.3], - [0.8, 0.3], - [0.8, 0.7], - [0.2, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], + [0.85, 0.7], + [0.15, 0.7], ], ], p: [ [ - [0.25, 0.9], - [0.25, 0.3], - [0.75, 0.3], - [0.75, 0.7], - [0.2, 0.7], + [0.15, 0.9], + [0.15, 0.3], + [0.85, 0.3], + [0.85, 0.7], + [0.125, 0.7], ], ], q: [ [ - [0.75, 0.9], - [0.75, 0.3], - [0.25, 0.3], - [0.25, 0.7], - [0.8, 0.7], + [0.85, 0.9], + [0.85, 0.3], + [0.15, 0.3], + [0.15, 0.7], + [0.875, 0.7], ], ], r: [ [ - [0.7, 0.3], - [0.4, 0.3], + [0.85, 0.3], + [0.35, 0.3], + [0.15, 0.4], ], [ - [0.4, 0.275], - [0.4, 0.7], + [0.15, 0.275], + [0.15, 0.7], ], ], s: [ [ - [0.8, 0.3], - [0.2, 0.3], - [0.2, 0.5], - [0.8, 0.5], - [0.8, 0.7], - [0.2, 0.7], + [0.85, 0.3], + [0.15, 0.3], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.7], + [0.15, 0.7], ], ], t: [ [ - [0.2, 0.3], - [0.8, 0.3], + [0.15, 0.3], + [0.85, 0.3], ], [ [0.35, 0.2], [0.35, 0.7], - [0.65, 0.7], + [0.85, 0.7], ], ], u: [ [ - [0.2, 0.3], - [0.2, 0.7], - [0.8, 0.7], + [0.15, 0.3], + [0.15, 0.7], + [0.85, 0.7], ], [ - [0.8, 0.75], - [0.8, 0.3], + [0.85, 0.75], + [0.85, 0.3], ], ], v: [ [ - [0.2, 0.3], + [0.15, 0.3], [0.5, 0.7], - [0.8, 0.3], + [0.85, 0.3], ], ], w: [ [ - [0.2, 0.3], - [0.2, 0.725], + [0.15, 0.3], + [0.15, 0.725], ], [ - [0.2, 0.7], - [0.8, 0.7], - [0.8, 0.3], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.3], ], [ [0.5, 0.3], @@ -547,51 +580,51 @@ const base = { ], x: [ [ - [0.2, 0.3], - [0.8, 0.7], + [0.15, 0.3], + [0.85, 0.7], ], [ - [0.8, 0.3], - [0.2, 0.7], + [0.85, 0.3], + [0.15, 0.7], ], ], y: [ [ - [0.25, 0.3], - [0.25, 0.7], - [0.775, 0.7], + [0.15, 0.3], + [0.15, 0.7], + [0.875, 0.7], ], [ - [0.75, 0.3], - [0.75, 0.9], + [0.85, 0.3], + [0.85, 0.9], [0.5, 0.9], ], ], z: [ [ - [0.2, 0.3], - [0.8, 0.3], - [0.2, 0.7], - [0.8, 0.7], + [0.15, 0.3], + [0.85, 0.3], + [0.15, 0.7], + [0.85, 0.7], ], ], œ: [ [ [0.5, 0.3], - [0.8, 0.3], - [0.8, 0.5], + [0.85, 0.3], + [0.85, 0.5], [0.5, 0.5], [0.5, 0.3], - [0.2, 0.3], - [0.2, 0.7], + [0.15, 0.3], + [0.15, 0.7], [0.5, 0.7], [0.5, 0.5], ], [ [0.5, 0.7], - [0.8, 0.7], + [0.85, 0.7], ], - ] + ], } as Font; export { base }; diff --git a/src/glyphs/lowercase/diaBaseAssociation.ts b/src/glyphs/lowercase/diaBaseAssociation.ts index 25e5a96..046ebde 100644 --- a/src/glyphs/lowercase/diaBaseAssociation.ts +++ b/src/glyphs/lowercase/diaBaseAssociation.ts @@ -59,6 +59,19 @@ const diaBaseAssociation = { ɖ: ["d", ["crs"]], // e ẹ: ["e", ["db"]], + é: ["e", ["ct"]], + è: ["e", ["gr"]], + ĕ: ["e", ["br"]], + ê: ["e", ["cr"]], + ě: ["e", ["hc"]], + ë: ["e", ["dr"]], + ė: ["e", ["gs"]], + ȩ: ["e", ["cd"]], + ḝ: ["e", ["br", "cd"]], + ę: ["e", ["gnk"]], + ē: ["e", ["mc"]], + ḗ: ["e", ["ct", "mc"]], + ẻ: ["e", ["ha"]], ẽ: ["e", ["tl"]], ế: ["e", ["cr", "ct"]], @@ -66,7 +79,6 @@ const diaBaseAssociation = { ể: ["e", ["cr", "ha"]], ễ: ["e", ["cr", "tl"]], ệ: ["e", ["cr", "db"]], - ḙ: ["e", ["crb"]], ḛ: ["e", ["tlb"]], diff --git a/src/glyphs/lowercase/index.ts b/src/glyphs/lowercase/index.ts index 87a9252..075ecc1 100644 --- a/src/glyphs/lowercase/index.ts +++ b/src/glyphs/lowercase/index.ts @@ -25,8 +25,8 @@ const topDiaCount = (diaKey: keyof Font): number => const moveDia = { tp: (g: Glyph) => - g.map((l: Line) => l.map((p: Vec) => [p[0], p[1] - 0.0625])), - bt: (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [p[0], p[1] + 0.125])), + g.map((l: Line) => l.map((p: Vec) => [p[0], p[1] - 0.08])), + bt: (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [p[0], p[1] + 0.08])), lf: (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [p[0] - 0.125, p[1]])), rg: (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [p[0] + 0.125, p[1]])), }; @@ -39,8 +39,17 @@ const mergeDia = (diaKeys: DiaGroup): Glyph => { 0, ); if (diaKeys.length > 1 && multipleTopDia > 1) { + // move macron down + if (diaKeys.includes("mc")) { + return diaKeys + .filter((k: keyof Font) => k !== "mc") + .reduce( + (g: Glyph, k: keyof Font) => [...g, ...diacritics[k]], + [...moveDia.bt(diacritics["mc"])], + ); + } // move acute accent left - if (diaKeys.includes("ct")) { + else if (diaKeys.includes("ct")) { return diaKeys .filter((k: keyof Font) => k !== "ct") .reduce( @@ -81,15 +90,7 @@ const mergeDia = (diaKeys: DiaGroup): Glyph => { [...moveDia.tp(diacritics["tl"])], ); } - // else move macron up - else if (diaKeys.includes("mc")) { - return diaKeys - .filter((k: keyof Font) => k !== "mc") - .reduce( - (g: Glyph, k: keyof Font) => [...g, ...diacritics[k]], - [...moveDia.tp(diacritics["mc"])], - ); - } else { + else { return diaKeys.reduce( (acc: Glyph, k: keyof Font) => [...acc, ...diacritics[k]], [] as Glyph, diff --git a/src/glyphs/number.ts b/src/glyphs/number.ts index f27ffe5..a247b70 100644 --- a/src/glyphs/number.ts +++ b/src/glyphs/number.ts @@ -1,114 +1,115 @@ const number = { - 0: [ - [ - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.2], - [0.25, 0.2] - ], - [ - [0.25, 0.2], - [0.75, 0.7] - ] - ], - 1: [ - [ - [0.25, 0.2], - [0.5, 0.2], - [0.5, 0.7] - ], - [ - [0.25, 0.7], - [0.75, 0.7] - ] - ], - 2: [ - [ - [0.25, 0.2], - [0.75, 0.2], - [0.75, 0.4], - [0.25, 0.4], - [0.25, 0.7], - [0.75, 0.7] - ] - ], - 3: [ - [ - [0.25, 0.2], - [0.75, 0.2], - [0.75, 0.7], - [0.25, 0.7] - ], [ - [0.5, 0.4], - [0.75, 0.4] - ] - ], - 4: [ - [ - [0.25, 0.2], - [0.25, 0.6], - [0.8, 0.6] - ], - [ - [0.7, 0.2], - [0.7, 0.7] - ] - ], - 5: [ - [ - [0.75, 0.2], - [0.25, 0.2], - [0.25, 0.4], - [0.75, 0.4], - [0.75, 0.7], - [0.25, 0.7] - ] - ], - 6: [ - [ - //[0.75, 0.3], - [0.75, 0.2], - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.4], - [0.25, 0.4] - ] - ], - 7: [ - [ - [0.25, 0.2], - [0.7, 0.2], - [0.7, 0.7] - ], - [ - [0.3, 0.4], - [0.8, 0.4] - ] - ], - 8: [ - [ - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.2], - [0.25, 0.2] - ],[ - [0.25, 0.4], - [0.75, 0.4] - ] - ], - 9: [ - [ - [0.75, 0.4], - [0.25, 0.4], - [0.25, 0.2], - [0.75, 0.2], - [0.75, 0.7], - [0.25, 0.7] - ] - ] -} + 0: [ + [ + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.2], + [0.15, 0.2], + ], + [ + [0.15, 0.2], + [0.85, 0.7], + ], + ], + 1: [ + [ + [0.15, 0.3], + [0.5, 0.2], + [0.5, 0.7], + ], + [ + [0.15, 0.7], + [0.85, 0.7], + ], + ], + 2: [ + [ + [0.15, 0.2], + [0.85, 0.2], + [0.85, 0.4], + [0.15, 0.4], + [0.15, 0.7], + [0.85, 0.7], + ], + ], + 3: [ + [ + [0.15, 0.2], + [0.85, 0.2], + [0.85, 0.7], + [0.15, 0.7], + ], + [ + [0.5, 0.4], + [0.85, 0.4], + ], + ], + 4: [ + [ + [0.15, 0.2], + [0.15, 0.6], + [0.85, 0.6], + ], + [ + [0.75, 0.2], + [0.75, 0.7], + ], + ], + 5: [ + [ + [0.75, 0.2], + [0.15, 0.2], + [0.15, 0.4], + [0.85, 0.4], + [0.85, 0.7], + [0.15, 0.7], + ], + ], + 6: [ + [ + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.4], + [0.15, 0.4], + ], + ], + 7: [ + [ + [0.15, 0.2], + [0.75, 0.2], + [0.75, 0.7], + ], + [ + [0.3, 0.4], + [0.85, 0.4], + ], + ], + 8: [ + [ + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.2], + [0.15, 0.2], + ], + [ + [0.15, 0.4], + [0.85, 0.4], + ], + ], + 9: [ + [ + [0.85, 0.4], + [0.15, 0.4], + [0.15, 0.2], + [0.85, 0.2], + [0.85, 0.7], + [0.15, 0.7], + ], + ], +}; -export default number +export default number; diff --git a/src/glyphs/uppercase.ts b/src/glyphs/uppercase.ts index 8f3df14..5e88c0d 100644 --- a/src/glyphs/uppercase.ts +++ b/src/glyphs/uppercase.ts @@ -1,41 +1,41 @@ const uppercase = { A: [ [ - [0.8, 0.7], - [0.8, 0.2], - [0.2, 0.2], - [0.2, 0.7], + [0.85, 0.7], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], ], [ - [0.2, 0.5], - [0.8, 0.5], + [0.15, 0.5], + [0.85, 0.5], ], ], B: [ [ [0.6, 0.5], [0.6, 0.2], - [0.2, 0.2], - [0.2, 0.7], - [0.8, 0.7], - [0.8, 0.5], - [0.2, 0.5], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.5], + [0.15, 0.5], ], ], C: [ [ - [0.75, 0.2], - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], ], ], D: [ [ - [0.2, 0.2], - [0.8, 0.2], - [0.8, 0.7], - [0.2, 0.7], + [0.15, 0.2], + [0.85, 0.2], + [0.85, 0.7], + [0.15, 0.7], ], [ [0.3, 0.2], @@ -44,59 +44,59 @@ const uppercase = { ], E: [ [ - [0.75, 0.2], - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], ], [ - [0.25, 0.5], + [0.15, 0.5], [0.55, 0.5], ], ], F: [ [ - [0.75, 0.2], - [0.25, 0.2], - [0.25, 0.7], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], ], [ - [0.25, 0.5], + [0.15, 0.5], [0.55, 0.5], ], ], G: [ [ - [0.8, 0.2], - [0.2, 0.2], - [0.2, 0.7], - [0.8, 0.7], - [0.8, 0.5], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.5], [0.5, 0.5], ], ], H: [ [ - [0.2, 0.2], - [0.2, 0.7], + [0.15, 0.2], + [0.15, 0.7], ], [ - [0.2, 0.5], - [0.8, 0.5], + [0.15, 0.5], + [0.85, 0.5], ], [ - [0.8, 0.2], - [0.8, 0.7], + [0.85, 0.2], + [0.85, 0.7], ], ], I: [ [ - [0.3, 0.2], - [0.7, 0.2], + [0.15, 0.2], + [0.85, 0.2], ], [ - [0.3, 0.7], - [0.7, 0.7], + [0.15, 0.7], + [0.85, 0.7], ], [ [0.5, 0.2], @@ -106,108 +106,108 @@ const uppercase = { J: [ [ [0.4, 0.2], - [0.8, 0.2], + [0.85, 0.2], ], [ [0.6, 0.2], [0.6, 0.7], - [0.2, 0.7], - [0.2, 0.6], + [0.15, 0.7], + [0.15, 0.6], ], ], K: [ [ - [0.25, 0.2], - [0.25, 0.7], + [0.15, 0.2], + [0.15, 0.7], ], [ - [0.7, 0.2], - [0.25, 0.5], - [0.7, 0.7], + [0.85, 0.2], + [0.15, 0.5], + [0.85, 0.7], ], ], L: [ [ - [0.25, 0.2], - [0.25, 0.7], - [0.7, 0.7], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], ], ], M: [ [ - [0.2, 0.7], - [0.2, 0.2], + [0.15, 0.7], + [0.15, 0.2], [0.5, 0.5], - [0.8, 0.2], - [0.8, 0.7], + [0.85, 0.2], + [0.85, 0.7], ], ], N: [ [ - [0.25, 0.7], - [0.25, 0.2], - [0.75, 0.7], - [0.75, 0.2], + [0.15, 0.7], + [0.15, 0.2], + [0.85, 0.7], + [0.85, 0.2], ], ], O: [ [ - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.2], - [0.25, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.2], + [0.15, 0.2], ], ], P: [ [ - [0.2, 0.5], - [0.7, 0.5], - [0.7, 0.2], - [0.2, 0.2], - [0.2, 0.7], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], ], ], Q: [ [ - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.2], - [0.25, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.2], + [0.15, 0.2], ], [ [0.6, 0.6], - [0.8, 0.75], + [0.85, 0.75], ], ], R: [ [ - [0.25, 0.5], - [0.7, 0.5], - [0.7, 0.2], - [0.25, 0.2], - [0.25, 0.7], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.7], ], [ - [0.25, 0.5], - [0.7, 0.7], + [0.15, 0.5], + [0.85, 0.7], ], ], S: [ [ - [0.75, 0.2], - [0.25, 0.2], - [0.25, 0.5], - [0.75, 0.5], - [0.75, 0.7], - [0.25, 0.7], + [0.85, 0.2], + [0.15, 0.2], + [0.15, 0.5], + [0.85, 0.5], + [0.85, 0.7], + [0.15, 0.7], ], ], T: [ [ - [0.25, 0.2], - [0.75, 0.2], + [0.15, 0.2], + [0.85, 0.2], ], [ [0.5, 0.2], @@ -216,43 +216,43 @@ const uppercase = { ], U: [ [ - [0.25, 0.2], - [0.25, 0.7], - [0.75, 0.7], - [0.75, 0.2], + [0.15, 0.2], + [0.15, 0.7], + [0.85, 0.7], + [0.85, 0.2], ], ], V: [ [ - [0.2, 0.2], + [0.15, 0.2], [0.5, 0.7], - [0.8, 0.2], + [0.85, 0.2], ], ], W: [ [ - [0.2, 0.2], + [0.15, 0.2], [0.3, 0.7], [0.5, 0.5], [0.7, 0.7], - [0.8, 0.2], + [0.85, 0.2], ], ], X: [ [ - [0.2, 0.2], - [0.8, 0.7], + [0.15, 0.2], + [0.85, 0.7], ], [ - [0.2, 0.7], - [0.8, 0.2], + [0.15, 0.7], + [0.85, 0.2], ], ], Y: [ [ - [0.2, 0.2], + [0.15, 0.2], [0.5, 0.5], - [0.8, 0.2], + [0.85, 0.2], ], [ [0.5, 0.5], @@ -261,10 +261,10 @@ const uppercase = { ], Z: [ [ - [0.25, 0.2], - [0.75, 0.2], - [0.25, 0.7], - [0.75, 0.7], + [0.15, 0.2], + [0.85, 0.2], + [0.15, 0.7], + [0.85, 0.7], ], ], };