diff --git a/demo/src/index.ts b/demo/src/index.ts index 2dc5c5a..6112dd5 100644 --- a/demo/src/index.ts +++ b/demo/src/index.ts @@ -136,7 +136,7 @@ const init = () => { inputSize.min = "0.05"; inputSize.max = "0.2"; inputSize.step = "0.01"; - inputSize.value = "0.07"; + inputSize.value = "0.1"; inputSize.addEventListener("change", update); diff --git a/src/glyphs/lowercase/base.ts b/src/glyphs/lowercase/base.ts index f6fa154..1387afd 100644 --- a/src/glyphs/lowercase/base.ts +++ b/src/glyphs/lowercase/base.ts @@ -1342,19 +1342,11 @@ const base = { ], ɷ: [ [ - [0.5, 0.7], - [0.8, 0.7], - [0.9, 0.5], - - [0.75, 0.35], - [0.66, 0.3], - [0.5, 0.25], - [0.33, 0.3], - [0.25, 0.35], - - [0.1, 0.5], - [0.2, 0.7], - [0.5, 0.7], + [0.15, 0.7], + [0.15, 0.3], + [0.85, 0.3], + [0.85, 0.7], + [0.15, 0.7], ], [ [0.5, 0.7], @@ -1378,6 +1370,23 @@ const base = { [0.85, 0.1], ], ], + œ: [ + [ + [0.5, 0.3], + [0.85, 0.3], + [0.85, 0.5], + [0.5, 0.5], + [0.5, 0.3], + [0.15, 0.3], + [0.15, 0.7], + [0.5, 0.7], + [0.5, 0.5], + ], + [ + [0.5, 0.7], + [0.85, 0.7], + ], + ], p: [ [ @@ -1673,23 +1682,6 @@ const base = { [0.85, 0.7], ], ], - œ: [ - [ - [0.5, 0.3], - [0.85, 0.3], - [0.85, 0.5], - [0.5, 0.5], - [0.5, 0.3], - [0.15, 0.3], - [0.15, 0.7], - [0.5, 0.7], - [0.5, 0.5], - ], - [ - [0.5, 0.7], - [0.85, 0.7], - ], - ], } as Font; export { base }; diff --git a/src/glyphs/lowercase/index.ts b/src/glyphs/lowercase/index.ts index 89d5c27..24c420c 100644 --- a/src/glyphs/lowercase/index.ts +++ b/src/glyphs/lowercase/index.ts @@ -24,7 +24,7 @@ const topDiaCount = (diaKey: keyof Font): number => topDia.includes(diaKey) ? 1 : 0; const moveDia = { - tp: (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [p[0], p[1] - 0.08])), + tp: (g: Glyph) => g.map((l: Line) => l.map((p: Vec) => [p[0], p[1] - 0.2])), 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]])), @@ -45,22 +45,37 @@ const mergeDia = (diaKeys: DiaGroup): Glyph => { ); if (diaKeys.length > 1 && multipleTopDia > 1) { // check double grave - if (diaKeys.reduce((ct: number, k: keyof Font)=> ct += k === 'gr' ? 1 : 0, 0) > 1) { + if ( + diaKeys.reduce((ct: number, k: keyof Font)=> ct += k === 'gr' ? 1 : 0, 0) > 1) { return joinVector( diaKeys.filter((k) => k != "gr").map((k) => diacritics[k]), [...moveDia.lf(diacritics['gr']), ...moveDia.rg(diacritics['gr'])] ) } // check double acute - if (diaKeys.reduce((ct: number, k: keyof Font)=> ct += k === 'ct' ? 1 : 0, 0) > 1) { + if ( + diaKeys.reduce((ct: number, k: keyof Font)=> ct += k === 'ct' ? 1 : 0, 0) > 1) { return joinVector( diaKeys.filter((k) => k != "ct").map((k) => diacritics[k]), [...moveDia.lf(diacritics['ct']), ...moveDia.rg(diacritics['ct'])] ) } - + // move tild down + if (diaKeys.includes("tl")) { + return joinVector( + diaKeys.filter((k) => k != "tl").map((k) => diacritics[k]), + moveDia.bt(diacritics["tl"]), + ); + } + // move tild down + else if (diaKeys.includes("hc")) { + return joinVector( + diaKeys.filter((k) => k != "hc").map((k) => diacritics[k]), + moveDia.bt(diacritics["hc"]), + ); + }   // move macron down - if (diaKeys.includes("mc")) { + else if (diaKeys.includes("mc")) { return joinVector( diaKeys.filter((k) => k != "mc").map((k) => diacritics[k]), moveDia.bt(diacritics["mc"]), @@ -86,13 +101,6 @@ const mergeDia = (diaKeys: DiaGroup): Glyph => { diaKeys.filter((k) => k != "br").map((k) => diacritics[k]), moveDia.bt(diacritics["br"]), ); - } - // move tild up - else if (diaKeys.includes("tl")) { - return joinVector( - diaKeys.filter((k) => k != "tl").map((k) => diacritics[k]), - moveDia.bt(diacritics["tl"]), - ); } else { return diaKeys.reduce( (acc: Glyph, k: keyof Font) => [...acc, ...diacritics[k]], diff --git a/src/glyphs/poncuation.ts b/src/glyphs/poncuation.ts index 798fa99..592088b 100644 --- a/src/glyphs/poncuation.ts +++ b/src/glyphs/poncuation.ts @@ -1,14 +1,14 @@ const ponctuation = { ".": [ [ - [0.5, 0.65], + [0.5, 0.675], [0.5, 0.7], ], ], ",": [ [ [0.5, 0.65], - [0.5, 0.675], + [0.49, 0.69], [0.45, 0.7], ], ], @@ -29,7 +29,7 @@ const ponctuation = { [0.5, 0.525], ], [ - [0.5, 0.65], + [0.5, 0.675], [0.5, 0.7], ], ], @@ -39,14 +39,14 @@ const ponctuation = { [0.5, 0.525], ], [ - [0.5, 0.65], + [0.5, 0.675], [0.5, 0.7], ], ], "¡": [ [ [0.5, 0.2], - [0.5, 0.25], + [0.5, 0.225], ], [ [0.5, 0.375], @@ -63,7 +63,7 @@ const ponctuation = { [0.5, 0.6], ], [ - [0.5, 0.65], + [0.5, 0.675], [0.5, 0.7], ], ], @@ -77,7 +77,7 @@ const ponctuation = { [0.5, 0.3], ], [ - [0.5, 0.25], + [0.5, 0.225], [0.5, 0.2], ], ], @@ -140,11 +140,11 @@ const ponctuation = { ], [ [0.25, 0.2], - [0.25, 0.25], + [0.25, 0.225], ], [ [0.75, 0.7], - [0.75, 0.65], + [0.75, 0.675], ], ], "|": [ @@ -195,12 +195,12 @@ const ponctuation = { ], "×": [ [ - [0.3, 0.35], - [0.6, 0.65] + [0.325, 0.305], + [0.675, 0.655] ], [ - [0.6, 0.35], - [0.3, 0.65] + [0.675, 0.305], + [0.325, 0.655] ] ], _: [