Browse Source

Add Latin characters

pull/27/head
Jongmin Kim 5 years ago committed by GitHub
parent
commit
527621f7be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/font/index.js
  2. 625
      src/font/latin.js
  3. 515
      src/font/lower.js
  4. 7
      src/font/special.js
  5. 611
      src/font/upper.js
  6. 2
      src/index.js
  7. 7
      src/leonsans.js

5
src/font/index.js

@ -10,11 +10,14 @@ import {
import { import {
SPECIAL SPECIAL
} from './special.js'; } from './special.js';
import {
LATIN
} from './latin.js';
import { import {
TOFU TOFU
} from './util.js'; } from './util.js';
const DATA = Object.assign({}, UPPER, LOWER, NUMBER, SPECIAL); const DATA = Object.assign({}, UPPER, LOWER, NUMBER, SPECIAL, LATIN);
export function typo(v) { export function typo(v) {
var t = DATA[v] || DATA[TOFU]; var t = DATA[v] || DATA[TOFU];

625
src/font/latin.js

@ -0,0 +1,625 @@
import {
generateFontData,
ROTATE_HORIZONTAL,
ROTATE_VERTICAL,
VERTEX_GAP2,
getR,
getCurveR
} from './util.js';
import {
DATA_UA,
DATA_UC,
DATA_UE,
DATA_UG,
DATA_UH,
DATA_UI,
DATA_UJ,
DATA_UN,
DATA_UO,
DATA_US,
DATA_UU,
DATA_UY
} from './upper.js';
import {
DATA_LA,
DATA_LC,
DATA_LE,
DATA_LG,
DATA_LH,
DATA_LN,
DATA_LO,
DATA_LS,
DATA_LU,
DATA_LY
} from './lower.js';
function getLatin1(x, y) {
const tx = 140 + x;
const ty = -390 - 78 + y;
return [{
d: -1,
v: [
['m', -40 + tx, 350 + ty, {
x: 0,
y: 0,
r: getR(-40 + tx, 350 + ty, 0 + tx, 60 + 350 + ty)
}],
['l', 0 + tx, 60 + 350 + ty, {
x: 0,
y: 0,
f: 1
}],
]
}];
}
function getLatin2(x, y) {
const tx = 150 + x;
const ty = -390 - 78 + y;
return [{
d: -1,
v: [
['m', 40 + tx, 350 + ty, {
x: 0,
y: 0,
r: getR(40 + tx, 350 + ty, 0 + tx, 60 + 350 + ty)
}],
['l', 0 + tx, 60 + 350 + ty, {
x: 0,
y: 0,
f: 1
}],
]
}];
}
function getLatin3(x, y) {
const tx = 77 + x;
const ty = -30 - 78 + y;
return [{
d: -1,
v: [
['m', 0 + tx, 50 + ty, {
r: getR(0 + tx, 50 + ty, 68 - VERTEX_GAP2 + tx, 0 + ty),
y: 0,
x: 0
}],
['l', 68 - VERTEX_GAP2 + tx, 0 + ty, {
r: getR(0 + tx, 50 + ty, 68 - VERTEX_GAP2 + tx, 0 + ty),
y: 0,
x: 0,
f: 1,
}],
['l', 68 + VERTEX_GAP2 + tx, 0 + ty, {
r: getR(68 + VERTEX_GAP2 + tx, 0 + ty, 68 + 68 + tx, 50 + ty),
y: 0,
x: 0,
f: 1,
v: 1
}],
['l', 68 + 68 + tx, 50 + ty, {
y: 0,
x: 0,
f: 1
}]
]
}];
}
function getLatin4(x, y) {
const tx = 65 + x;
const ty = -16 - 78 + y;
const scale = 0.8;
return [{
d: 1,
v: [
['m', 199.4 * scale + tx, 20.7 * scale + ty, {
x: -1,
y: -0.2,
r: getCurveR(199.4 * scale + tx, 20.7 * scale + ty, 187.6 * scale + tx, 36.6 * scale + ty, 168.2 * scale + tx, 47.1 * scale + ty, 148.2 * scale + tx, 47.1 * scale + ty, 0),
f: 1
}],
['b', 187.6 * scale + tx, 36.6 * scale + ty, 168.2 * scale + tx, 47.1 * scale + ty, 148.2 * scale + tx, 47.1 * scale + ty, {
x: -1,
y: -0.2,
r: ROTATE_VERTICAL
}],
['b', 129.1 * scale + tx, 47.1 * scale + ty, 112.1 * scale + tx, 36.6 * scale + ty, 95.3 * scale + tx, 25.5 * scale + ty, {
x: -1,
y: -0.2
}],
['b', 76.8 * scale + tx, 13.2 * scale + ty, 59.1 * scale + tx, 0 * scale + ty, 39.6 * scale + tx, 0 * scale + ty, {
x: -1,
y: -0.2,
r: ROTATE_VERTICAL
}],
['b', 22.3 * scale + tx, 0 * scale + ty, 10.9 * scale + tx, 8.9 * scale + ty, 0 * scale + tx, 20 * scale + ty, {
x: -1,
y: -0.2
}],
]
}];
}
function getLatin5(x, y) {
return [{
d: 1,
v: [
['a', 145 - 50 + x, -78 + y, {
x: 0,
y: 0
}],
]
}, {
d: 1,
v: [
['a', 145 + 50 + x, -78 + y, {
x: 0,
y: 0
}],
]
}];
}
function getLatin6(x, y) {
const tx = x;
const ty = y;
return [{
d: 1,
v: [
['m', 112.7 + tx, 0.0 + ty, {
r: getCurveR(112.7 + tx, 0.0 + ty + tx, 10.1 + ty, 110.1 + tx, 19.3 + ty, 105.0 + tx, 27.7 + ty, 0),
x: 0,
y: 0,
f: 1
}],
['b', 112.7 + tx, 10.1 + ty, 110.1 + tx, 19.3 + ty, 105.0 + tx, 27.7 + ty, {
x: 0,
y: 0,
}],
['b', 99.8 + tx, 36.1 + ty, 92.9 + tx, 42.8 + ty, 84.3 + tx, 47.7 + ty, {
x: 0,
y: 0,
}],
['b', 75.7 + tx, 52.6 + ty, 66.7 + tx, 55.0 + ty, 57.3 + tx, 55.0 + ty, {
x: 0,
y: 0,
}],
['b', 47.5 + tx, 55.0 + ty, 38.3 + tx, 52.6 + ty, 29.6 + tx, 47.7 + ty, {
x: 0,
y: 0,
}],
['b', 20.8 + tx, 42.8 + ty, 13.8 + tx, 36.1 + ty, 8.5 + tx, 27.7 + ty, {
x: 0,
y: 0,
}],
['b', 3.2 + tx, 19.3 + ty, 0.5 + tx, 10.1 + ty, 0.5 + tx, 0.0 + ty, {
x: 0,
y: 0,
}],
]
}];
}
function getLatin7(x, y) {
const tx = 88 + x;
const ty = -116 + y;
const scale = 0.5;
return [{
d: 1,
v: [
['m', 232 * scale + tx, 116 * scale + ty, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['b', 232 * scale + tx, 180.1 * scale + ty, 180.1 * scale + tx, 232 * scale + ty, 116 * scale + tx, 232 * scale + ty, {
r: ROTATE_VERTICAL
}],
['b', 51.9 * scale + tx, 232 * scale + ty, 0 * scale + tx, 180.1 * scale + ty, 0 * scale + tx, 116 * scale + ty, {
r: ROTATE_HORIZONTAL
}],
['b', 0 * scale + tx, 51.9 * scale + ty, 51.9 * scale + tx, 0 * scale + ty, 116 * scale + tx, 0 * scale + ty, {
r: ROTATE_VERTICAL
}],
['b', 180.1 * scale + tx, 0 * scale + ty, 232 * scale + tx, 51.9 * scale + ty, 232 * scale + tx, 116 * scale + ty, {
r: ROTATE_HORIZONTAL,
c: 1
}],
]
}]
}
const DATA_LI = [{
d: 1,
v: [
['m', 0, 352, {
y: 0,
f: 1
}],
['l', 0, 130, {
y: -3
}],
]
}];
const DATA_LJ = [{
d: 1,
v: [
['m', 0 - 115.9, 317 + 127, {
x: 0.4,
y: 0.63,
r: getCurveR(0 - 115.9, 317 + 127, 12.6 - 115.9, 327.4 + 127, 29.6 - 115.9, 333.2 + 127, 45.9 - 115.9, 334.2 + 127, 0),
f: 1
}],
['b', 12.6 - 115.9, 327.4 + 127, 29.6 - 115.9, 333.2 + 127, 45.9 - 115.9, 334.2 + 127, {
x: 0.4,
y: 0.63,
r: ROTATE_VERTICAL
}],
['b', 84.5 - 115.9, 336.5 + 127, 115.9 - 115.9, 308.1 + 127, 115.9 - 115.9, 269.4 + 127, {
x: 0.4,
y: 0.63,
r: ROTATE_HORIZONTAL
}],
['l', 115.9 - 115.9, 0 + 127 + 3, {
y: -3
}],
]
}];
export const LATIN = {
'À': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin1(0, 20))
),
'Á': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin2(0, 20))
),
'Â': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin3(0, 0))
),
'Ã': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin4(0, 20))
),
'Ä': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin5(0, 20))
),
'Å': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin7(0, 0))
),
'à': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin1(-29, -15))
),
'á': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin2(-29, -15))
),
'â': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin3(-29, -15))
),
'ã': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin4(-29, -15))
),
'ä': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin5(9, -15))
),
'å': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin7(-30, 0))
),
'È': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin1(-40, 0))
),
'É': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin2(-40, 0))
),
'Ê': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin3(-49, 0))
),
'Ë': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin5(-40, 0))
),
'è': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin1(-28, -14))
),
'é': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin2(-28, -14))
),
'ê': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin3(-28, -14))
),
'ë': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin5(-28, -14))
),
'Ì': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin1(-145, 0))
),
'Í': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin2(-145, 0))
),
'Î': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin3(-145, 0))
),
'Ï': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin5(-145, 0))
),
'ì': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin1(-145, 109))
),
'í': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin2(-145, 109))
),
'î': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin3(-145, 109))
),
'ï': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin5(-145, 109))
),
'Ñ': generateFontData(
721, 250, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UN)).concat(getLatin4(-20, 0))
),
'ñ': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LN)).concat(getLatin4(-54, 109))
),
'Ò': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin1(35, 4))
),
'Ó': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin2(35, 4))
),
'Ô': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin3(35, 4))
),
'Õ': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin4(35, 4))
),
'Ö': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin5(35, 4))
),
'Ø': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat([{
d: 1,
v: [
['m', 0, 360, {
r: getR(0, 360, 360, 0),
f: 1,
x: 0,
y: 1
}],
['l', 360, 0, {
x: 0,
y: 1
}]
]
}])
),
'ò': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin1(-29, -15))
),
'ó': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin2(-29, -15))
),
'ô': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin3(-29, -15))
),
'õ': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin4(-29, -15))
),
'ö': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin5(-29, -15))
),
'ø': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat([{
d: 1,
v: [
['m', 0, 232, {
r: getR(0, 232, 232, 0),
f: 1,
x: 0,
y: 1
}],
['l', 232, 0, {
x: 0,
y: 1
}]
]
}])
),
'Ù': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin1(-20, 1))
),
'Ú': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin2(-20, 1))
),
'Û': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin3(-20, 1))
),
'Ŭ': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin6(69, -107))
),
'Ü': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin5(-20, 1))
),
'ù': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin1(-54, 109))
),
'ú': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin2(-54, 109))
),
'û': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin3(-54, 109))
),
'ŭ': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin6(34, 0))
),
'ü': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin5(-54, 109))
),
'Ý': generateFontData(
673, 270, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UY)).concat(getLatin2(-10, 0))
),
'ý': generateFontData(
500, 225.5, 331.5,
10, 10, -119, -119,
JSON.parse(JSON.stringify(DATA_LY)).concat(getLatin2(-30, -20))
),
'ÿ': generateFontData(
500, 225.5, 331.5,
10, 10, -119, -119,
JSON.parse(JSON.stringify(DATA_LY)).concat(getLatin5(-30, -20))
),
'Ĉ': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC)).concat(getLatin3(20, 4))
),
'Ĝ': generateFontData(
840, 352, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UG)).concat(getLatin3(30, 4))
),
'Ĥ': generateFontData(
684, 232, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UH)).concat(getLatin3(-29, 0))
),
'Ĵ': generateFontData(
472, 172.5, 355.5,
10, 20, -2, -2,
JSON.parse(JSON.stringify(DATA_UJ)).concat(getLatin3(-50, 0))
),
'Ŝ': generateFontData(
560, 224, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_US)).concat(getLatin3(-30, 4))
),
'ĉ': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC)).concat(getLatin3(-29, -14))
),
'ĝ': generateFontData(
600, 232, 338,
10, 2, -117, -117,
JSON.parse(JSON.stringify(DATA_LG)).concat(getLatin3(-29, -15))
),
'ĥ': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LH)).concat(getLatin3(-52, 9))
),
'ĵ': generateFontData(
220, 115.9, 352,
-60, -60, 0, 0,
JSON.parse(JSON.stringify(DATA_LJ)).concat(getLatin3(-155, 109))
),
'ŝ': generateFontData(
400, 224 * 0.642, 360 * 0.642,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LS)).concat(getLatin3(-73, -15))
),
};

515
src/font/lower.js

@ -9,11 +9,7 @@ import {
getCurveR getCurveR
} from './util.js'; } from './util.js';
export const LOWER = { export const DATA_LA = [{
'a': generateFontData(
600, 232, 232,
10, 2, -64, -64,
[{
d: -1, d: -1,
v: [ v: [
['m', 232, 8, { ['m', 232, 8, {
@ -41,7 +37,263 @@ export const LOWER = {
f: 1 f: 1
}] }]
] ]
}, ] }];
export const DATA_LC = [{
d: 1,
v: [
['m', 212.1, 182.9, {
r: getCurveR(212.1, 182.9, 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, 0),
f: 1
}],
['b', 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, {
r: ROTATE_VERTICAL
}],
['b', 52.4, 233.1, 0.5, 181.2, 0.5, 117.1, {
r: ROTATE_HORIZONTAL
}],
['b', 0.5, 53, 52.4, 1.1, 116.5, 1.1, {
r: ROTATE_VERTICAL
}],
['b', 156.1, 1.1, 191.1, 21, 212.1, 51.3],
]
}];
export const DATA_LE = [{
d: 1,
v: [
['m', 211.6, 182.9, {
r: getCurveR(211.6, 182.9, 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, 0),
f: 1
}],
['b', 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, {
r: ROTATE_VERTICAL
}],
['b', 52.4, 233.1, 0.5, 181.2, 0.5, 117.1, {
r: ROTATE_HORIZONTAL
}],
['b', 0.5, 53, 52.4, 1.1, 116.5, 1.1, {
r: ROTATE_VERTICAL
}],
['b', 176.4, 1.1, 224.9, 47.2, 225.5, 106.1, {
r: ROTATE_HORIZONTAL
}],
['l', 0.5, 106.1, {
r: ROTATE_HORIZONTAL,
p: 1
}],
]
}];
export const DATA_LG = [{
d: -1,
v: [
['m', 232, 5, {
y: -2.8
}],
['l', 232, 116, {
r: ROTATE_NONE
}],
['b', 232, 180.1, 180.1, 232, 116, 232, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 232, 0, 180.1, 0, 116, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 51.9, 51.9, 0, 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 0, 232, 51.9, 232, 116, {
r: ROTATE_HORIZONTAL
}],
['l', 232, 222],
['b', 234.5, 300.3, 180.2, 338.5, 116, 338, {
y: 0.64,
r: ROTATE_VERTICAL
}],
['b', 76.2, 337.7, 36.6, 320.7, 15.7, 290.1, {
y: 0.64,
f: 1
}],
]
}];
export const DATA_LH = [{
d: -1,
v: [
['m', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 352, {
y: 0,
f: 1
}],
]
}, {
d: -1,
v: [
['m', 0, 91 + 123, {
r: ROTATE_NONE
}],
['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, {
r: ROTATE_VERTICAL
}],
['b', 141.3, 0 + 123, 182, 40.7 + 123, 182, 91 + 123, {
r: ROTATE_HORIZONTAL
}],
['l', 182, 352, {
y: 0,
f: 1
}],
]
}];
export const DATA_LN = [{
d: -1,
v: [
['m', 0, 130, {
y: -3.3
}],
['l', 0, 352, {
y: 0,
f: 1
}],
]
}, {
d: -1,
v: [
['m', 0, 91 + 123, {
y: 0,
r: ROTATE_HORIZONTAL,
p: 1
}],
['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, {
r: ROTATE_VERTICAL
}],
['b', 141.3, 0 + 123, 182, 40.7 + 123, 182, 91 + 123, {
r: ROTATE_HORIZONTAL
}],
['l', 182, 352, {
y: 0,
f: 1
}],
]
}];
export const DATA_LO = [{
d: 1,
v: [
['m', 232, 116, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['b', 232, 180.1, 180.1, 232, 116, 232, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 232, 0, 180.1, 0, 116, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 51.9, 51.9, 0, 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 0, 232, 51.9, 232, 116, {
r: ROTATE_HORIZONTAL,
c: 1
}],
]
}];
export const DATA_LS = [{
d: 1,
v: [
['m', 0 * 0.642, 295.4 * 0.642, {
r: getCurveR(0 * 0.642, 295.4 * 0.642, 17.6 * 0.642, 332.1 * 0.642, 58.3 * 0.642, 360 * 0.642, 110.3 * 0.642, 360 * 0.642, 0),
f: 1
}],
['b', 17.6 * 0.642, 332.1 * 0.642, 58.3 * 0.642, 360 * 0.642, 110.3 * 0.642, 360 * 0.642],
['b', 173.9 * 0.642, 360 * 0.642, 223.8 * 0.642, 329.6 * 0.642, 224 * 0.642, 271 * 0.642],
['b', 224.2 * 0.642, 214.7 * 0.642, 180.7 * 0.642, 189.6 * 0.642, 112.4 * 0.642, 173.3 * 0.642],
['b', 47.3 * 0.642, 157.7 * 0.642, 10.9 * 0.642, 130.6 * 0.642, 12 * 0.642, 84.4 * 0.642],
['b', 13.3 * 0.642, 29.8 * 0.642, 57.3 * 0.642, 0 * 0.642, 114.8 * 0.642, 0 * 0.642],
['b', 158.4 * 0.642, 0 * 0.642, 196.5 * 0.642, 20.5 * 0.642, 212 * 0.642, 51.3 * 0.642],
]
}];
export const DATA_LU = [{
d: -1,
v: [
['m', 0, 130, {
y: -3
}],
['l', 0, 0 + 265, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 50.3 + 265, 40.7, 91 + 265, 91, 91 + 265, {
r: ROTATE_VERTICAL
}],
['b', 141.3, 91 + 265, 182, 50.3 + 265, 182, 0 + 265, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1,
}],
]
},
{
d: -1,
v: [
['m', 182, 130, {
y: -3
}],
['l', 182, 352, {
y: 0,
f: 1
}],
]
}
];
export const DATA_LY = [{
d: -1,
v: [
['m', 225.5, 0, {
y: -3,
r: getR(225.5, 0, 116.3, 248.8)
}],
['l', 116.3, 248.8, {
x: 0.5,
y: 0.64
}],
['b', 71.8, 349.6, 0, 331.5, 0, 331.5, {
x: 0.5,
y: 0.64,
r: getCurveR(0, 331.5, 71.8, 349.6, 116.3, 248.8, 0, 331.5, 0),
f: 1
}],
]
},
{
d: -1,
v: [
['m', 3.2, 0, {
y: -3,
r: getR(3.2, 0, 125.7, 226.6)
}],
['l', 125.7, 226.6, {
p: 1,
f: 1
}],
]
}
];
export const LOWER = {
'a': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA))
), ),
'b': generateFontData( 'b': generateFontData(
600, 232, 352, 600, 232, 352,
@ -80,25 +332,7 @@ export const LOWER = {
'c': generateFontData( 'c': generateFontData(
520, 212.1, 233.1, 520, 212.1, 233.1,
2, -10, -64, -64, 2, -10, -64, -64,
[{ JSON.parse(JSON.stringify(DATA_LC))
d: 1,
v: [
['m', 212.1, 182.9, {
r: getCurveR(212.1, 182.9, 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, 0),
f: 1
}],
['b', 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, {
r: ROTATE_VERTICAL
}],
['b', 52.4, 233.1, 0.5, 181.2, 0.5, 117.1, {
r: ROTATE_HORIZONTAL
}],
['b', 0.5, 53, 52.4, 1.1, 116.5, 1.1, {
r: ROTATE_VERTICAL
}],
['b', 156.1, 1.1, 191.1, 21, 212.1, 51.3],
]
}]
), ),
'd': generateFontData( 'd': generateFontData(
600, 232, 352, 600, 232, 352,
@ -134,31 +368,7 @@ export const LOWER = {
'e': generateFontData( 'e': generateFontData(
570, 225.5, 233.1, 570, 225.5, 233.1,
0, 0, -64, -64, 0, 0, -64, -64,
[{ JSON.parse(JSON.stringify(DATA_LE))
d: 1,
v: [
['m', 211.6, 182.9, {
r: getCurveR(211.6, 182.9, 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, 0),
f: 1
}],
['b', 191.1, 213.2, 156.1, 233.1, 116.5, 233.1, {
r: ROTATE_VERTICAL
}],
['b', 52.4, 233.1, 0.5, 181.2, 0.5, 117.1, {
r: ROTATE_HORIZONTAL
}],
['b', 0.5, 53, 52.4, 1.1, 116.5, 1.1, {
r: ROTATE_VERTICAL
}],
['b', 176.4, 1.1, 224.9, 47.2, 225.5, 106.1, {
r: ROTATE_HORIZONTAL
}],
['l', 0.5, 106.1, {
r: ROTATE_HORIZONTAL,
p: 1
}],
]
}]
), ),
'f': generateFontData( 'f': generateFontData(
356, 232, 352, 356, 232, 352,
@ -200,72 +410,12 @@ export const LOWER = {
'g': generateFontData( 'g': generateFontData(
600, 232, 338, 600, 232, 338,
10, 2, -117, -117, 10, 2, -117, -117,
[{ JSON.parse(JSON.stringify(DATA_LG))
d: -1,
v: [
['m', 232, 5, {
y: -2.8
}],
['l', 232, 116, {
r: ROTATE_NONE
}],
['b', 232, 180.1, 180.1, 232, 116, 232, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 232, 0, 180.1, 0, 116, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 51.9, 51.9, 0, 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 0, 232, 51.9, 232, 116, {
r: ROTATE_HORIZONTAL
}],
['l', 232, 222],
['b', 234.5, 300.3, 180.2, 338.5, 116, 338, {
y: 0.64,
r: ROTATE_VERTICAL
}],
['b', 76.2, 337.7, 36.6, 320.7, 15.7, 290.1, {
y: 0.64,
f: 1
}],
]
}]
), ),
'h': generateFontData( 'h': generateFontData(
520, 182, 352, 520, 182, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_LH))
d: -1,
v: [
['m', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 352, {
y: 0,
f: 1
}],
]
}, {
d: -1,
v: [
['m', 0, 91 + 123, {
r: ROTATE_NONE
}],
['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, {
r: ROTATE_VERTICAL
}],
['b', 141.3, 0 + 123, 182, 40.7 + 123, 182, 91 + 123, {
r: ROTATE_HORIZONTAL
}],
['l', 182, 352, {
y: 0,
f: 1
}],
]
}]
), ),
'i': generateFontData( 'i': generateFontData(
200, 0, 352, 200, 0, 352,
@ -445,66 +595,12 @@ export const LOWER = {
'n': generateFontData( 'n': generateFontData(
520, 182, 352, 520, 182, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_LN))
d: -1,
v: [
['m', 0, 130, {
y: -3.3
}],
['l', 0, 352, {
y: 0,
f: 1
}],
]
}, {
d: -1,
v: [
['m', 0, 91 + 123, {
y: 0,
r: ROTATE_HORIZONTAL,
p: 1
}],
['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, {
r: ROTATE_VERTICAL
}],
['b', 141.3, 0 + 123, 182, 40.7 + 123, 182, 91 + 123, {
r: ROTATE_HORIZONTAL
}],
['l', 182, 352, {
y: 0,
f: 1
}],
]
}
]
), ),
'o': generateFontData( 'o': generateFontData(
580, 232, 232, 580, 232, 232,
0, 0, -64, -64, 0, 0, -64, -64,
[{ JSON.parse(JSON.stringify(DATA_LO))
d: 1,
v: [
['m', 232, 116, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['b', 232, 180.1, 180.1, 232, 116, 232, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 232, 0, 180.1, 0, 116, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 51.9, 51.9, 0, 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 0, 232, 51.9, 232, 116, {
r: ROTATE_HORIZONTAL,
c: 1
}],
]
}]
), ),
'p': generateFontData( 'p': generateFontData(
600, 232, 338, 600, 232, 338,
@ -604,21 +700,7 @@ export const LOWER = {
's': generateFontData( 's': generateFontData(
400, 224 * 0.642, 360 * 0.642, 400, 224 * 0.642, 360 * 0.642,
0, 0, -64, -64, 0, 0, -64, -64,
[{ JSON.parse(JSON.stringify(DATA_LS))
d: 1,
v: [
['m', 0 * 0.642, 295.4 * 0.642, {
r: getCurveR(0 * 0.642, 295.4 * 0.642, 17.6 * 0.642, 332.1 * 0.642, 58.3 * 0.642, 360 * 0.642, 110.3 * 0.642, 360 * 0.642, 0),
f: 1
}],
['b', 17.6 * 0.642, 332.1 * 0.642, 58.3 * 0.642, 360 * 0.642, 110.3 * 0.642, 360 * 0.642],
['b', 173.9 * 0.642, 360 * 0.642, 223.8 * 0.642, 329.6 * 0.642, 224 * 0.642, 271 * 0.642],
['b', 224.2 * 0.642, 214.7 * 0.642, 180.7 * 0.642, 189.6 * 0.642, 112.4 * 0.642, 173.3 * 0.642],
['b', 47.3 * 0.642, 157.7 * 0.642, 10.9 * 0.642, 130.6 * 0.642, 12 * 0.642, 84.4 * 0.642],
['b', 13.3 * 0.642, 29.8 * 0.642, 57.3 * 0.642, 0 * 0.642, 114.8 * 0.642, 0 * 0.642],
['b', 158.4 * 0.642, 0 * 0.642, 196.5 * 0.642, 20.5 * 0.642, 212 * 0.642, 51.3 * 0.642],
]
}]
), ),
't': generateFontData( 't': generateFontData(
356, 232, 352, 356, 232, 352,
@ -657,38 +739,7 @@ export const LOWER = {
'u': generateFontData( 'u': generateFontData(
520, 182, 352, 520, 182, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_LU))
d: -1,
v: [
['m', 0, 130, {
y: -3
}],
['l', 0, 0 + 265, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 50.3 + 265, 40.7, 91 + 265, 91, 91 + 265, {
r: ROTATE_VERTICAL
}],
['b', 141.3, 91 + 265, 182, 50.3 + 265, 182, 0 + 265, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1,
}],
]
},
{
d: -1,
v: [
['m', 182, 130, {
y: -3
}],
['l', 182, 352, {
y: 0,
f: 1
}],
]
}
]
), ),
'v': generateFontData( 'v': generateFontData(
500, 200, 352, 500, 200, 352,
@ -804,39 +855,7 @@ export const LOWER = {
'y': generateFontData( 'y': generateFontData(
500, 225.5, 331.5, 500, 225.5, 331.5,
10, 10, -119, -119, 10, 10, -119, -119,
[{ JSON.parse(JSON.stringify(DATA_LY))
d: -1,
v: [
['m', 225.5, 0, {
y: -3,
r: getR(225.5, 0, 116.3, 248.8)
}],
['l', 116.3, 248.8, {
x: 0.5,
y: 0.64
}],
['b', 71.8, 349.6, 0, 331.5, 0, 331.5, {
x: 0.5,
y: 0.64,
r: getCurveR(0, 331.5, 71.8, 349.6, 116.3, 248.8, 0, 331.5, 0),
f: 1
}],
]
},
{
d: -1,
v: [
['m', 3.2, 0, {
y: -3,
r: getR(3.2, 0, 125.7, 226.6)
}],
['l', 125.7, 226.6, {
p: 1,
f: 1
}],
]
}
]
), ),
'z': generateFontData( // 232, 224 'z': generateFontData( // 232, 224
420, 172, 352, 420, 172, 352,

7
src/font/special.js

@ -3,7 +3,6 @@ import {
ROTATE_HORIZONTAL, ROTATE_HORIZONTAL,
ROTATE_VERTICAL, ROTATE_VERTICAL,
ROTATE_NONE, ROTATE_NONE,
VERTEX_GAP,
getR, getR,
getCurveR, getCurveR,
VERTEX_GAP2 VERTEX_GAP2
@ -298,10 +297,10 @@ export const SPECIAL = {
d: -1, d: -1,
v: [ v: [
['m', 0, 150, { ['m', 0, 150, {
r: getR(0, 150, 88 - VERTEX_GAP, 0) r: getR(0, 150, 88 - VERTEX_GAP2, 0)
}], }],
['l', 88 - VERTEX_GAP, 0, { ['l', 88 - VERTEX_GAP2, 0, {
r: getR(0, 150, 88 - VERTEX_GAP, 0), r: getR(0, 150, 88 - VERTEX_GAP2, 0),
f: 1 f: 1
}], }],
['l', 88 + VERTEX_GAP2, 0, { ['l', 88 + VERTEX_GAP2, 0, {

611
src/font/upper.js

@ -2,18 +2,13 @@ import {
generateFontData, generateFontData,
ROTATE_HORIZONTAL, ROTATE_HORIZONTAL,
ROTATE_VERTICAL, ROTATE_VERTICAL,
ROTATE_NONE,
VERTEX_GAP, VERTEX_GAP,
VERTEX_GAP2, VERTEX_GAP2,
getR, getR,
getCurveR getCurveR
} from './util.js'; } from './util.js';
export const UPPER = { export const DATA_UA = [{
'A': generateFontData(
620, 290, 352,
0, 0, 0, 0,
[{
d: -1, d: -1,
v: [ v: [
['m', 0, 352, { ['m', 0, 352, {
@ -51,7 +46,299 @@ export const UPPER = {
}], }],
] ]
} }
];
export const DATA_UC = [{
d: 1,
v: [
['m', 293.1, 320.1, {
r: getCurveR(293.1, 320.1, 262.2, 345, 222.8, 360, 180, 360, 0),
f: 1
}],
['b', 262.2, 345, 222.8, 360, 180, 360],
['b', 80.6, 360, 0, 279.4, 0, 180],
['b', 0, 80.6, 80.6, 0, 180, 0],
['b', 222.8, 0, 262.2, 15, 293.1, 39.9],
]
}];
export const DATA_UE = [{
d: -1,
v: [
['m', 192, 0, {
x: 0,
r: ROTATE_VERTICAL,
}],
['l', 0, 0, {
r: ROTATE_HORIZONTAL,
f: 1,
x: 0.5
}],
['l', 0, 352, {
f: 1,
x: 0.5
}],
['l', 192, 352, {
x: 0,
r: ROTATE_VERTICAL,
f: 1
}],
]
},
{
d: -1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1,
x: 0.5
}],
['l', 180, 164, {
x: 0,
r: ROTATE_VERTICAL,
f: 1
}],
]
}
];
export const DATA_UG = [{
d: 1,
v: [
['m', 202, 180, {
r: ROTATE_VERTICAL,
f: 1
}],
['l', 352, 180, {
f: 1
}],
['b', 352, 279.4, 279.4, 360, 180, 360, {
r: ROTATE_VERTICAL
}],
['b', 80.6, 360, 0, 279.4, 0, 180, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 80.6, 80.6, 0, 180, 0, {
r: ROTATE_VERTICAL
}],
['b', 222.8, 0, 262.1, 14.9, 293, 39.9],
]
}];
export const DATA_UH = [{
d: -1,
v: [
['m', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
},
{
d: -1,
v: [
['m', 232, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 232, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
},
{
d: -1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1
}],
['l', 232, 164, {
r: ROTATE_VERTICAL,
f: 1,
p: 1
}],
]
}
];
export const DATA_UI = [{
d: 1,
v: [
['m', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
]
}];
export const DATA_UJ = [{
d: 1,
v: [
['m', 0, 310.5 + 0.5, {
r: getCurveR(0, 310.5 + 0.5, 16.2, 341.1 + 0.5, 49.3, 355.5 + 0.5, 86, 355.5 + 0.5, 0),
f: 1
}],
['b', 16.2, 341.1 + 0.5, 49.3, 355.5 + 0.5, 86, 355.5 + 0.5, {
r: ROTATE_VERTICAL
}],
['b', 133.5, 355.5 + 0.5, 172, 317 + 0.5, 172, 269.5 + 0.5],
['l', 172.5, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
]
}];
export const DATA_UN = [{
d: -1,
v: [
['m', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 0, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0 + VERTEX_GAP, 0, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1,
v: 1
}],
['l', 250 - VERTEX_GAP, 351, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['l', 250, 351, {
r: ROTATE_HORIZONTAL,
f: 1,
v: 1
}],
['l', 250, 0, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
}];
export const DATA_UO = [{
d: 1,
v: [
['m', 360, 180, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['b', 360, 279.4, 279.4, 360, 180, 360, {
r: ROTATE_VERTICAL
}],
['b', 80.6, 360, 0, 279.4, 0, 180, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 80.6, 80.6, 0, 180, 0, {
r: ROTATE_VERTICAL
}],
['b', 279.4, 0, 360, 80.6, 360, 180, {
r: ROTATE_HORIZONTAL,
c: 1
}],
]
}];
export const DATA_US = [{
d: 1,
v: [
['m', 0, 295.4, {
r: getCurveR(0, 295.4, 17.6, 332.1, 58.3, 360, 110.3, 360, 0),
f: 1
}],
['b', 17.6, 332.1, 58.3, 360, 110.3, 360],
['b', 173.9, 360, 223.8, 329.6, 224, 271],
['b', 224.2, 214.7, 180.7, 189.6, 112.4, 173.3],
['b', 47.3, 157.7, 10.9, 130.6, 12, 84.4],
['b', 13.3, 29.8, 57.3, 0, 114.8, 0],
['b', 158.4, 0, 196.5, 20.5, 212, 51.3],
]
}];
export const DATA_UU = [{
d: 1,
v: [
['m', 250, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 250, 230 + 1, {
r: ROTATE_HORIZONTAL
}],
['b', 250, 299 + 1, 194, 355 + 1, 125, 355 + 1, {
r: ROTATE_VERTICAL
}],
['b', 56, 355 + 1, 0, 299 + 1, 0, 230 + 1, {
r: ROTATE_HORIZONTAL
}],
['l', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
]
}];
export const DATA_UY = [{
d: -1,
v: [
['m', 0, 0, {
x: 0.6,
y: 0.3,
r: getR(0, 0, 135, 186),
}],
['l', 135, 186, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 270, 0, {
x: 0.6,
y: 0.3,
f: 1
}]
]
},
{
d: -1,
v: [
['m', 135, 186, {
r: ROTATE_HORIZONTAL,
p: 1
}],
['l', 135, 352, {
y: 0,
f: 1
}],
] ]
}
];
export const UPPER = {
'A': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA))
), ),
'B': generateFontData( 'B': generateFontData(
596, 209, 352, 596, 209, 352,
@ -97,19 +384,7 @@ export const UPPER = {
'C': generateFontData( 'C': generateFontData(
700, 293.1, 360, 700, 293.1, 360,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UC))
d: 1,
v: [
['m', 293.1, 320.1, {
r: getCurveR(293.1, 320.1, 262.2, 345, 222.8, 360, 180, 360, 0),
f: 1
}],
['b', 262.2, 345, 222.8, 360, 180, 360],
['b', 80.6, 360, 0, 279.4, 0, 180],
['b', 0, 80.6, 80.6, 0, 180, 0],
['b', 222.8, 0, 262.2, 15, 293.1, 39.9],
]
}]
), ),
'D': generateFontData( 'D': generateFontData(
721, 270, 352, 721, 270, 352,
@ -122,69 +397,31 @@ export const UPPER = {
r: ROTATE_VERTICAL, r: ROTATE_VERTICAL,
f: 1 f: 1
}], }],
['b', 191.6, 352, 270, 271.6, 270, 175, { ['b', 191.6, 352, 270, 271.6, 270, 175, {
r: ROTATE_HORIZONTAL r: ROTATE_HORIZONTAL
}], }],
['b', 270, 78.4, 191.6, 0, 95, 0, { ['b', 270, 78.4, 191.6, 0, 95, 0, {
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
}],
['l', 0, 0, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0, 352, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 95, 352, {
r: ROTATE_VERTICAL,
f: 1
}],
]
}]
),
'E': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
[{
d: -1,
v: [
['m', 192, 0, {
x: 0,
r: ROTATE_VERTICAL,
}], }],
['l', 0, 0, { ['l', 0, 0, {
r: ROTATE_HORIZONTAL, r: ROTATE_HORIZONTAL,
f: 1, f: 1
x: 0.5
}], }],
['l', 0, 352, { ['l', 0, 352, {
f: 1, r: ROTATE_HORIZONTAL,
x: 0.5
}],
['l', 192, 352, {
x: 0,
r: ROTATE_VERTICAL,
f: 1 f: 1
}], }],
] ['l', 95, 352, {
},
{
d: -1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1,
x: 0.5
}],
['l', 180, 164, {
x: 0,
r: ROTATE_VERTICAL, r: ROTATE_VERTICAL,
f: 1 f: 1
}], }],
] ]
} }]
] ),
'E': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE))
), ),
'F': generateFontData( 'F': generateFontData(
510, 192, 352, 510, 192, 352,
@ -228,114 +465,22 @@ export const UPPER = {
'G': generateFontData( 'G': generateFontData(
840, 352, 360, 840, 352, 360,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UG))
d: 1,
v: [
['m', 202, 180, {
r: ROTATE_VERTICAL,
f: 1
}],
['l', 352, 180, {
f: 1
}],
['b', 352, 279.4, 279.4, 360, 180, 360, {
r: ROTATE_VERTICAL
}],
['b', 80.6, 360, 0, 279.4, 0, 180, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 80.6, 80.6, 0, 180, 0, {
r: ROTATE_VERTICAL
}],
['b', 222.8, 0, 262.1, 14.9, 293, 39.9],
]
}]
), ),
'H': generateFontData( 'H': generateFontData(
684, 232, 352, 684, 232, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UH))
d: -1,
v: [
['m', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
},
{
d: -1,
v: [
['m', 232, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 232, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
},
{
d: -1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1
}],
['l', 232, 164, {
r: ROTATE_VERTICAL,
f: 1,
p: 1
}],
]
},
]
), ),
'I': generateFontData( 'I': generateFontData(
249, 0, 352, 249, 0, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UI))
d: 1,
v: [
['m', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
]
}, ]
), ),
'J': generateFontData( 'J': generateFontData(
472, 172.5, 355.5, 472, 172.5, 355.5,
10, 20, -2, -2, 10, 20, -2, -2,
[{ JSON.parse(JSON.stringify(DATA_UJ))
d: 1,
v: [
['m', 0, 310.5 + 0.5, {
r: getCurveR(0, 310.5 + 0.5, 16.2, 341.1 + 0.5, 49.3, 355.5 + 0.5, 86, 355.5 + 0.5, 0),
f: 1
}],
['b', 16.2, 341.1 + 0.5, 49.3, 355.5 + 0.5, 86, 355.5 + 0.5, {
r: ROTATE_VERTICAL
}],
['b', 133.5, 355.5 + 0.5, 172, 317 + 0.5, 172, 269.5 + 0.5],
['l', 172.5, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
]
}, ]
), ),
'K': generateFontData( 'K': generateFontData(
616, 232, 352, 616, 232, 352,
@ -449,67 +594,12 @@ export const UPPER = {
'N': generateFontData( 'N': generateFontData(
721, 250, 352, 721, 250, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UN))
d: -1,
v: [
['m', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 0, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0 + VERTEX_GAP, 0, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1,
v: 1
}],
['l', 250 - VERTEX_GAP, 351, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['l', 250, 351, {
r: ROTATE_HORIZONTAL,
f: 1,
v: 1
}],
['l', 250, 0, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
}]
), ),
'O': generateFontData( 'O': generateFontData(
850, 360, 360, 850, 360, 360,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UO))
d: 1,
v: [
['m', 360, 180, {
r: ROTATE_HORIZONTAL,
p: 1,
f: 1
}],
['b', 360, 279.4, 279.4, 360, 180, 360, {
r: ROTATE_VERTICAL
}],
['b', 80.6, 360, 0, 279.4, 0, 180, {
r: ROTATE_HORIZONTAL
}],
['b', 0, 80.6, 80.6, 0, 180, 0, {
r: ROTATE_VERTICAL
}],
['b', 279.4, 0, 360, 80.6, 360, 180, {
r: ROTATE_HORIZONTAL,
c: 1
}],
]
}]
), ),
'P': generateFontData( 'P': generateFontData(
568, 210, 352, 568, 210, 352,
@ -632,21 +722,7 @@ export const UPPER = {
'S': generateFontData( 'S': generateFontData(
560, 224, 360, 560, 224, 360,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_US))
d: 1,
v: [
['m', 0, 295.4, {
r: getCurveR(0, 295.4, 17.6, 332.1, 58.3, 360, 110.3, 360, 0),
f: 1
}],
['b', 17.6, 332.1, 58.3, 360, 110.3, 360],
['b', 173.9, 360, 223.8, 329.6, 224, 271],
['b', 224.2, 214.7, 180.7, 189.6, 112.4, 173.3],
['b', 47.3, 157.7, 10.9, 130.6, 12, 84.4],
['b', 13.3, 29.8, 57.3, 0, 114.8, 0],
['b', 158.4, 0, 196.5, 20.5, 212, 51.3],
]
}]
), ),
'T': generateFontData( 'T': generateFontData(
568, 232, 352, 568, 232, 352,
@ -684,28 +760,7 @@ export const UPPER = {
'U': generateFontData( 'U': generateFontData(
712, 250, 355, 712, 250, 355,
0, 0, -0.5, -0.5, 0, 0, -0.5, -0.5,
[{ JSON.parse(JSON.stringify(DATA_UU))
d: 1,
v: [
['m', 250, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 250, 230 + 1, {
r: ROTATE_HORIZONTAL
}],
['b', 250, 299 + 1, 194, 355 + 1, 125, 355 + 1, {
r: ROTATE_VERTICAL
}],
['b', 56, 355 + 1, 0, 299 + 1, 0, 230 + 1, {
r: ROTATE_HORIZONTAL
}],
['l', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
]
}]
), ),
'V': generateFontData( 'V': generateFontData(
650, 270, 352, 650, 270, 352,
@ -819,39 +874,7 @@ export const UPPER = {
'Y': generateFontData( 'Y': generateFontData(
673, 270, 352, 673, 270, 352,
0, 0, 0, 0, 0, 0, 0, 0,
[{ JSON.parse(JSON.stringify(DATA_UY))
d: -1,
v: [
['m', 0, 0, {
x: 0.6,
y: 0.3,
r: getR(0, 0, 135, 186),
}],
['l', 135, 186, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 270, 0, {
x: 0.6,
y: 0.3,
f: 1
}]
]
},
{
d: -1,
v: [
['m', 135, 186, {
r: ROTATE_HORIZONTAL,
p: 1
}],
['l', 135, 352, {
y: 0,
f: 1
}],
]
}
]
), ),
'Z': generateFontData( 'Z': generateFontData(
558, 232, 352, 558, 232, 352,

2
src/index.js

@ -1,2 +1,2 @@
const LeonSans = require('./LeonSans').default; const LeonSans = require('./leonsans').default;
module.exports = LeonSans; module.exports = LeonSans;

7
src/leonsans.js

@ -1,3 +1,10 @@
/*!
* VERSION: 1.6.1
* DATE: 2019-09-05
* https://leon-sans.com
*
* @license Copyright (c) 2019, Jongmin Kim. All rights reserved.
**/
import { import {
Dispatcher Dispatcher
} from './core/dispatcher.js'; } from './core/dispatcher.js';

Loading…
Cancel
Save