Skip to content

Commit

Permalink
y
Browse files Browse the repository at this point in the history
  • Loading branch information
nclslbrn committed May 9, 2024
1 parent 1a07f28 commit e33295e
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 45 deletions.
5 changes: 3 additions & 2 deletions demo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const mirrorXGlyph = (g: Glyph) =>
g.map((l: Line) => l.map((p: Vec) => [1 - p[0], p[1]]));

// font["ɜ"] = mirrorYGlyph(font["ɛ"])
//alert(`ɯ: ${JSON.stringify(mirrorXGlyph(font["w"]))},`);
// alert(`ʏ: ${JSON.stringify(scaleGlyph(font["Y"]))},`);

for (let l = 0; l < lowercase.length; l++) {
if (font[lowercase[l]] === undefined) {
Expand Down Expand Up @@ -99,13 +99,14 @@ const update = () => {
rect.setAttribute("width", `${textSize[0]}`);
rect.setAttribute("height", `${textSize[1]}`);
rect.setAttribute("title", char);
/*
const label = document.createElementNS(namespace, "text");
label.setAttribute("x", `${margin[0] + x * textSize[0] + 10}`);
label.setAttribute("y", `${margin[1] + y * textSize[1] + 20}`);
label.setAttribute("font-size", `${fontScale*20}em`)
label.textContent = char;
group.appendChild(label);

*/
lines.map((d: string) => {
const path = document.createElementNS(namespace, "path");
path.setAttribute("d", d);
Expand Down
191 changes: 150 additions & 41 deletions src/glyphs/lowercase/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,66 +433,69 @@ const base = {
],
ɜ: [
[
[0.25, 0.35],
[0.4, 0.3],
[0.75, 0.4],
[0.4, 0.5],
[0.75, 0.6],
[0.4, 0.7],
[0.25, 0.65],
[0.15, 0.3],
[0.85, 0.3],
[0.85, 0.7],
[0.15, 0.7],
],
[
[0.5, 0.5],
[0.85, 0.5],
],
],
ɝ: [
[
[0.25, 0.35],
[0.4, 0.3],
[0.75, 0.4],
[0.4, 0.5],
[0.75, 0.6],
[0.4, 0.7],
[0.25, 0.65],
[0.15, 0.3],
[0.7, 0.3],
[0.7, 0.7],
[0.15, 0.7],
],
[
[0.5, 0.5],
[0.73, 0.5],
],
[
[0.85, 0.5],
[0.75, 0.45],
[0.75, 0.4],
[0.8, 0.45],
[0.8, 0.4],
[0.7, 0.4],
],
],
ɞ: [
[
[0.25, 0.65],
[0.2, 0.55],
[0.2, 0.45],
[0.25, 0.35],
[0.4, 0.3],
[0.75, 0.4],
[0.4, 0.5],
[0.75, 0.6],
[0.4, 0.7],
[0.25, 0.65],
[0.2, 0.3],
[0.8, 0.3],
[0.8, 0.7],
[0.2, 0.7],
[0.2, 0.3],
],
[
[0.5, 0.5],
[0.8, 0.5],
],
],
ʚ: [
[
[0.75, 0.65],
[0.8, 0.55],
[0.8, 0.45],
[0.75, 0.35],
[0.6, 0.3],
[0.25, 0.4],
[0.6, 0.5],
[0.25, 0.6],
[0.6, 0.7],
[0.75, 0.65],
[0.2, 0.3],
[0.8, 0.3],
[0.8, 0.7],
[0.2, 0.7],
[0.2, 0.3],
],
[
[0.2, 0.5],
[0.5, 0.5],
],
],
ɤ: [
[
[0.15, 0.3],
[0.15, 0.4],
[0.25, 0.3],
[0.65, 0.6],
[0.5, 0.7],
[0.35, 0.6],
[0.85, 0.3],
[0.75, 0.3],
[0.85, 0.4],
],
],

Expand Down Expand Up @@ -1936,18 +1939,41 @@ const base = {
[0.25, 0.7],
[0.75, 0.7],
[0.55, 0.3],
[0.85, 0.3]
]
[0.85, 0.3],
],
],


v: [
[
[0.15, 0.3],
[0.5, 0.7],
[0.85, 0.3],
],
],
ʋ: [
[
[0.15, 0.3],
[0.5, 0.7],
[0.85, 0.3],
[0.65, 0.3],
],
],
: [
[
[0.15, 0.15],
[0.5, 0.7],
[0.85, 0.4],
[0.65, 0.4],
],
],
ʌ: [
[
[0.15, 0.7],
[0.5, 0.3],
[0.85, 0.7],
],
],

w: [
[
[0.15, 0.3],
Expand All @@ -1963,6 +1989,22 @@ const base = {
[0.5, 0.7],
],
],
ʍ: [
[
[0.85, 0.7],
[0.85, 0.275],
],
[
[0.85, 0.3],
[0.15, 0.3],
[0.15, 0.7],
],
[
[0.5, 0.7],
[0.5, 0.3],
],
],

x: [
[
[0.15, 0.3],
Expand All @@ -1973,6 +2015,7 @@ const base = {
[0.15, 0.7],
],
],

y: [
[
[0.15, 0.3],
Expand All @@ -1985,6 +2028,72 @@ const base = {
[0.5, 0.9],
],
],
ʏ: [
[
[0.265,0.3],
[0.5, 0.5],
[0.73, 0.3]
],
[
[0.5, 0.5],
[0.5,0.628]
]
],
ɏ: [
[
[0.25, 0.3],
[0.25, 0.7],
[0.775, 0.7],
],
[
[0.75, 0.3],
[0.75, 0.9],
[0.5, 0.9],
],
[
[0.15, 0.5],
[0.85, 0.5]
]
],
ƴ: [
[
[0.15, 0.3],
[0.15, 0.7],
[0.775, 0.7],
],
[
[0.85, 0.3],
[0.75, 0.3],
[0.75, 0.9],
[0.5, 0.9],
],
],
ỿ: [
[
[0.15, 0.3],
[0.15, 0.7],
[0.775, 0.7],
],
[
[0.75, 0.3],
[0.75, 0.9],
[0.5, 0.9],
[0.85, 0.7]
],
],
ȝ: [
[
[0.25, 0.4],
[0.75, 0.3],
[0.75, 0.65],
[0.25, 0.75],
],
[
[0.5, 0.55],
[0.75, 0.5],
],
],

z: [
[
[0.15, 0.3],
Expand Down
26 changes: 24 additions & 2 deletions src/glyphs/lowercase/diaBaseAssociation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,37 @@ const diaBaseAssociation = {
: ["u", ["drb"]],
: ["u", ["crb"]],
: ["u", ["tlb"]],

// v
: ["v", ["tl"]],
ṿ: ["v", ["db"]],

// w
: ["w", ["ct"]],
: ["w", ["gr"]],
ŵ: ["w", ["cr"]],
: ["w", ["gs"]],
: ["w", ["dr"]],
: ["w", ["da"]],
: ["w", ["db"]],

// x
: ["x", ["dr"]],
: ["x", ["da"]],


// y
ý: ["y", ["ct"]],
: ["y", ["gr"]],
ŷ: ["y", ["cr"]],
: ["y", ["gs"]],
ÿ: ["y", ["dr"]],
: ["y", ["tl"]],
: ["y", ["da"]],
ȳ: ["y", ["mc"]],

: ["y", ["db"]],
: ["y", ["ha"]],
: ["y", ["tl"]],
} as ExtendedTable;

export { diaBaseAssociation };

0 comments on commit e33295e

Please sign in to comment.