Browse Source

Updated latin characters and some special characters

«»×÷¿¡·
ÀÁÂÃÄÅĂĄÆ
ÞßĆĈĊČÇĤÝ
ĎĐÈÉÊËĒĔĖĚ
ĜĞĠĢÙÚÛÜŬ
ŜŞĴÑÌÍÎÏ
àáâãåäăąæ
þćĉċčçĥýÿ
ďđèéêëēĕėě
ĝğġģùúûüŭ
ŝşĵñìíîï
pull/27/head
Jongmin Kim 5 years ago
parent
commit
544c1b60a9
  1. 3
      .gitignore
  2. 16
      dist/leon.js
  3. 7
      examples/all.html
  4. 14
      examples/index.html
  5. 5
      src/font/index.js
  6. 728
      src/font/latin.js
  7. 338
      src/font/latinutil.js
  8. 493
      src/font/lower.js
  9. 329
      src/font/special.js
  10. 540
      src/font/upper.js
  11. 2
      src/index.js
  12. 7
      src/leonsans.js

3
.gitignore vendored

@ -0,0 +1,3 @@
examples/.DS_Store
examples/data/.DS_Store

16
dist/leon.js vendored

File diff suppressed because one or more lines are too long

7
examples/all.html

@ -54,12 +54,12 @@
}; };
leon = new LeonSans({ leon = new LeonSans({
text: 'abcdefghijklmn\nopqrstuvwxyz\nABCDEFGHIJK\nLMNOPQRST\nUVWXYZ\n0123456789\n?!$^&*(){}[]<>~\n:;,.\'"+=-_@#%', text: 'abcdefghijklmn\nopqrstuvwxyz\nABCDEFGHIJK\nLMNOPQRST\nUVWXYZ\n0123456789\n?!$^&*@#%:;\n(){}[]<>«»~_\n\'"·+=-×÷¿¡,.\nÀÁÂÃÄÅĂĄÆ\nÞßĆĈĊČÇĤÝ\nĎĐÈÉÊËĒĔĖĚ\nĜĞĠĢÙÚÛÜŬ\nŜŞĴÑÌÍÎÏ\nàáâãåäăąæ\nþćĉċčçĥýÿ\nďđèéêëēĕėě\nĝğġģùúûüŭ\nŝşĵñìíîï',
color: ['#342f2e'], color: ['#342f2e'],
size: getSize(90), size: getSize(90),
weight: 200, weight: 200,
tracking: 2, tracking: 2,
leading: 1, leading: 2,
align: 'center' align: 'center'
}); });
@ -83,7 +83,8 @@
ctx.clearRect(0, 0, sw, sh); ctx.clearRect(0, 0, sw, sh);
const x = (sw - leon.rect.w) / 2; const x = (sw - leon.rect.w) / 2;
const y = (sh - leon.rect.h) / 2; let y = (sh - leon.rect.h) / 2;
if (y < 0) y = 0;
leon.position(x + moveX, y + moveY); leon.position(x + moveX, y + moveY);
ctx.save(); ctx.save();

14
examples/index.html

@ -6,6 +6,20 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>Leon Sans examples</title> <title>Leon Sans examples</title>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Leon Sans examples">
<meta name="description" content="Leon Sans is a geometric sans-serif typeface made with code in 2019 by Jongmin Kim.">
<meta itemprop="name" content="Leon Sans examples" />
<meta itemprop="description" content="Leon Sans is a geometric sans-serif typeface made with code in 2019 by Jongmin Kim."/>
<meta itemprop="image" content="https://leon-kim.com/img/share.png" />
<meta property="og:site_name" content="Leon Sans examples" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Leon Sans examples" />
<meta property="og:url" content="https://leon-kim.com" />
<meta property="og:image" content="https://leon-kim.com/img/share.png" />
<meta property="og:description" content="Leon Sans is a geometric sans-serif typeface made with code in 2019 by Jongmin Kim." />
<style> <style>
html, html,

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];

728
src/font/latin.js

@ -0,0 +1,728 @@
import {
generateFontData,
ROTATE_HORIZONTAL,
ROTATE_VERTICAL,
ROTATE_NONE,
getR,
getCurveR
} from './util.js';
import {
getLatin1,
getLatin2,
getLatin3,
getLatin4,
getLatin5,
getLatin6,
getLatin7,
getLatin8,
getLatin9,
getLatin10,
getLatin11,
getLatin12,
getLatin13,
getLatin14
} from './latinutil.js';
import {
DATA_UA,
DATA_UC,
DATA_UD,
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_LD,
DATA_LE,
DATA_LG,
DATA_LH,
DATA_LN,
DATA_LO,
DATA_LS,
DATA_LU,
DATA_LY
} from './lower.js';
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, 0, 308.1 + 127, 0, 269.4 + 127, {
x: 0.4,
y: 0.63,
r: ROTATE_HORIZONTAL
}],
['l', 0, 0 + 127 + 3, {
y: -3
}],
]
}];
export const LATIN = {
'Æ': generateFontData(
996, 426, 352,
0, 0, 0, 0,
[{
d: -1,
v: [
['m', 426.0, 0.0, {
x: 0,
r: ROTATE_VERTICAL
}],
['l', 234.0, 0.0, {
x: 0.5,
f: 1,
r: getR(234.0, 0.0, .0, 352.0),
}],
['l', 0.0, 352.0, {
x: 0.5,
y: 0.5,
f: 1
}],
]
}, {
d: -1,
v: [
['m', 234.0, 0.0, {
x: 0.5,
p: 1,
}],
['l', 234.0, 352.0, {
f: 1,
x: 0.5
}],
['l', 426.0, 352.0, {
f: 1,
x: 0
}]
]
}, {
d: -1,
v: [
['m', 76.4, 237.0, {
r: ROTATE_VERTICAL,
p: 1,
}],
['l', 234.0, 237.0, {
f: 1,
r: ROTATE_VERTICAL,
p: 1,
}]
]
}, {
d: -1,
v: [
['m', 234.0, 164.0, {
r: ROTATE_VERTICAL,
p: 1,
x: 0.5
}],
['l', 414.0, 164.0, {
f: 1,
x: 0
}]
]
}]
),
'æ': generateFontData(
1000, 232 + 225.5, 232,
0, 0, -64, -64,
[{
d: -1,
v: [
['m', 232, 8, {
y: -3.4,
r: ROTATE_HORIZONTAL
}],
['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, 224, {
y: -0.1,
r: ROTATE_HORIZONTAL,
f: 1
}]
]
}, {
d: 1,
v: [
['m', 211.6 + 232, 182.9, {
r: getCurveR(211.6 + 232, 182.9, 191.1 + 232, 213.2, 156.1 + 232, 233.1, 116.5 + 232, 233.1, 0),
f: 1
}],
['b', 191.1 + 232, 213.2, 156.1 + 232, 233.1, 116.5 + 232, 233.1, {
r: ROTATE_VERTICAL
}],
['b', 52.4 + 232, 233.1, 0.5 + 232, 181.2, 0.5 + 232, 117.1, {
r: ROTATE_HORIZONTAL
}],
['b', 0.5 + 232, 53, 52.4 + 232, 1.1, 116.5 + 232, 1.1, {
r: ROTATE_VERTICAL
}],
['b', 176.4 + 232, 1.1, 224.9 + 232, 47.2, 225.5 + 232, 106.1, {
r: ROTATE_HORIZONTAL
}],
['l', 0.5 + 232, 106.1, {
r: ROTATE_HORIZONTAL,
p: 1
}],
]
}]
),
'À': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin1(145, -50))
),
'Á': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin2(145, -50))
),
'Â': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin3(145, -100))
),
'Ã': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin4(145, -90))
),
'Ä': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin5(145, -70))
),
'Å': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin7(0, 0))
),
'Ă': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin6(145, -110))
),
'Ą': generateFontData(
620, 290, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UA)).concat(getLatin10(290, 352))
),
'à': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin1(116, -60))
),
'á': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin2(116, -60))
),
'â': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin3(116, -110))
),
'ã': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin4(116, -100))
),
'ä': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin5(116, -80))
),
'å': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin7(-30, 0))
),
'ă': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin6(116, -120))
),
'ą': generateFontData(
600, 232, 232,
10, 2, -64, -64,
JSON.parse(JSON.stringify(DATA_LA)).concat(getLatin10(232, 224))
),
'Ć': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC)).concat(getLatin1(180, -60))
),
'Ĉ': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC)).concat(getLatin3(180, -110))
),
'Ċ': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC)).concat(getLatin11(180, -80))
),
'Č': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC)).concat(getLatin12(180, -110))
),
'Ç': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC)).concat(getLatin9(180, 360))
),
'ć': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC)).concat(getLatin1(116.5, 1.1 - 70))
),
'ĉ': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC)).concat(getLatin3(116.5, 1.1 - 120))
),
'ċ': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC)).concat(getLatin11(116.5, 1.1 - 90))
),
'č': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC)).concat(getLatin12(116.5, 1.1 - 120))
),
'ç': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC)).concat(getLatin9(116.5, 233.1))
),
'Đ': generateFontData(
721, 270, 352,
-10, -10, 0, 0,
JSON.parse(JSON.stringify(DATA_UD)).concat(getLatin8(0, 352 / 2))
),
'Ď': generateFontData(
721, 270, 352,
-10, -10, 0, 0,
JSON.parse(JSON.stringify(DATA_UD)).concat(getLatin12(100, -110))
),
'ď': generateFontData(
600, 232, 352,
10, 2, 0, 0,
JSON.parse(JSON.stringify(DATA_LD)).concat(getLatin13(300, 0))
),
'đ': generateFontData(
600, 232, 352,
10, 2, 0, 0,
JSON.parse(JSON.stringify(DATA_LD)).concat(getLatin8(180, 40))
),
'È': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin1(96, -60))
),
'É': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin2(96, -60))
),
'Ê': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin3(96, -110))
),
'Ë': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin5(96, -80))
),
'Ē': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin14(96, -80))
),
'Ĕ': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin6(96, -120))
),
'Ė': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin11(96, -80))
),
'Ě': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE)).concat(getLatin12(96, -110))
),
'è': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin1(112, -60))
),
'é': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin2(112, -60))
),
'ê': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin3(112, -110))
),
'ë': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin5(112, -80))
),
'ē': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin14(112, -80))
),
'ĕ': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin6(112, -120))
),
'ė': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin11(112, -90))
),
'ě': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE)).concat(getLatin12(112, -120))
),
'Ĝ': generateFontData(
840, 352, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UG)).concat(getLatin3(180, -110))
),
'Ğ': generateFontData(
840, 352, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UG)).concat(getLatin6(180, -120))
),
'Ġ': generateFontData(
840, 352, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UG)).concat(getLatin11(180, -80))
),
'Ģ': generateFontData(
840, 352, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UG)).concat(getLatin9(180, 360))
),
'ĝ': generateFontData(
600, 232, 338,
10, 2, -117, -117,
JSON.parse(JSON.stringify(DATA_LG)).concat(getLatin3(116, 1.1 - 120))
),
'ğ': generateFontData(
600, 232, 338,
10, 2, -117, -117,
JSON.parse(JSON.stringify(DATA_LG)).concat(getLatin6(116, -120))
),
'ġ': generateFontData(
600, 232, 338,
10, 2, -117, -117,
JSON.parse(JSON.stringify(DATA_LG)).concat(getLatin11(116, -90))
),
'ģ': generateFontData(
600, 232, 338,
10, 2, -117, -117,
JSON.parse(JSON.stringify(DATA_LG)).concat(getLatin2(116, -70))
),
'Ĥ': generateFontData(
684, 232, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UH)).concat(getLatin3(232 / 2, -110))
),
'ĥ': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LH)).concat(getLatin3(182 / 2, -110))
),
'Ì': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin1(0, -60))
),
'Í': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin2(0, -60))
),
'Î': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin3(0, -110))
),
'Ï': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI)).concat(getLatin5(0, -80))
),
'ì': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin1(0, -60 + 130))
),
'í': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin2(0, -60 + 130))
),
'î': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin3(0, -120 + 130))
),
'ï': generateFontData(
200, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LI)).concat(getLatin5(0, -80 + 130))
),
'Ĵ': generateFontData(
472, 172.5, 355.5,
10, 20, -2, -2,
JSON.parse(JSON.stringify(DATA_UJ)).concat(getLatin3(172.5, -110))
),
'ĵ': generateFontData(
220, 115.9, 352,
-60, -60, 0, 0,
JSON.parse(JSON.stringify(DATA_LJ)).concat(getLatin3(0, -110 + 130))
),
'Ñ': generateFontData(
721, 250, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UN)).concat(getLatin4(250 / 2, -100))
),
'ñ': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LN)).concat(getLatin4(182 / 2, -100 + 130))
),
'Ò': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin1(180, -60))
),
'Ó': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin2(180, -60))
),
'Ô': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin3(180, -110))
),
'Õ': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin4(180, -100))
),
'Ö': generateFontData(
850, 360, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UO)).concat(getLatin5(180, -80))
),
'Ø': 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(116, -60))
),
'ó': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin2(116, -60))
),
'ô': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin3(116, -110))
),
'õ': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin4(116, -100))
),
'ö': generateFontData(
580, 232, 232,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LO)).concat(getLatin5(116, -80))
),
'ø': 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(
560, 224, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_US)).concat(getLatin3(112.4, -110))
),
'ŝ': generateFontData(
400, 224 * 0.642, 360 * 0.642,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LS)).concat(getLatin3(112.4 * 0.642, -110))
),
'Ş': generateFontData(
560, 224, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_US)).concat(getLatin9(110.3, 360))
),
'ş': generateFontData(
400, 224 * 0.642, 360 * 0.642,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LS)).concat(getLatin9(110.3 * 0.642, 360 * 0.642))
),
'Ù': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin1(125, -50))
),
'Ú': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin2(125, -50))
),
'Û': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin3(125, -100))
),
'Ŭ': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin6(125, -110))
),
'Ü': generateFontData(
712, 250, 355,
0, 0, -0.5, -0.5,
JSON.parse(JSON.stringify(DATA_UU)).concat(getLatin5(125, -70))
),
'ù': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin1(91, -60 + 130))
),
'ú': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin2(91, -60 + 130))
),
'û': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin3(91, -110 + 130))
),
'ŭ': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin6(91, -120 + 130))
),
'ü': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LU)).concat(getLatin5(91, -80 + 130))
),
'Ý': generateFontData(
673, 270, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UY)).concat(getLatin2(135, -60))
),
'ý': generateFontData(
500, 225.5, 331.5,
10, 10, -119, -119,
JSON.parse(JSON.stringify(DATA_LY)).concat(getLatin2(116.3, -60))
),
'ÿ': generateFontData(
500, 225.5, 331.5,
10, 10, -119, -119,
JSON.parse(JSON.stringify(DATA_LY)).concat(getLatin5(116.3, -90))
),
};

338
src/font/latinutil.js

@ -0,0 +1,338 @@
import {
ROTATE_HORIZONTAL,
ROTATE_VERTICAL,
VERTEX_GAP2,
getR,
getCurveR
} from './util.js';
//À
export function getLatin1(x, y) {
const tx = x;
const ty = -60 + y;
return [{
d: -1,
v: [
['m', -40 + tx, ty, {
x: 0,
y: 0,
r: getR(-40 + tx, ty, 0 + tx, 60 + ty)
}],
['l', 0 + tx, 60 + ty, {
x: 0,
y: 0,
f: 1
}],
]
}];
}
//Á
export function getLatin2(x, y) {
const tx = x;
const ty = -60 + y;
return [{
d: -1,
v: [
['m', 40 + tx, ty, {
x: 0,
y: 0,
r: getR(40 + tx, ty, 0 + tx, 60 + ty)
}],
['l', 0 + tx, 60 + ty, {
x: 0,
y: 0,
f: 1
}],
]
}];
}
//Â
export function getLatin3(x, y) {
const tx = -68 + x;
const ty = 0 + 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
}]
]
}];
}
//Ã
export function getLatin4(x, y) {
const tx = x - 76.24;
const ty = y;
return [{
d: 1,
v: [
['m', 159.52 + tx, 16.56 + ty, {
x: -1,
y: -0.2,
r: getCurveR(159.52 + tx, 16.56 + ty, 150.08 + tx, 29.28 + ty, 134.56 + tx, 37.68 + ty, 118.56 + tx, 37.68 + ty, 0),
f: 1
}],
['b', 150.08 + tx, 29.28 + ty, 134.56 + tx, 37.68 + ty, 118.56 + tx, 37.68 + ty, {
x: -1,
y: -0.2,
r: ROTATE_VERTICAL
}],
['b', 103.28 + tx, 37.68 + ty, 89.68 + tx, 29.28 + ty, 76.24 + tx, 20.4 + ty, {
x: -1,
y: -0.2
}],
['b', 61.44 + tx, 10.56 + ty, 47.28 + tx, 0 + ty, 31.68 + tx, 0 + ty, {
x: -1,
y: -0.2,
r: ROTATE_VERTICAL
}],
['b', 17.84 + tx, 0 + ty, 8.72 + tx, 7.12 + ty, 0 + tx, 16 + ty, {
x: -1,
y: -0.2
}],
]
}];
}
//Ä
export function getLatin5(x, y) {
return [{
d: 1,
v: [
['a', -50 + x, y, {
x: 0,
y: 0
}],
]
}, {
d: 1,
v: [
['a', 50 + x, y, {
x: 0,
y: 0
}],
]
}];
}
//Ŭ
export function getLatin6(x, y) {
const tx = x - 57;
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,
}],
]
}];
}
//Å
export 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
}],
]
}]
}
//Ð
export function getLatin8(x, y) {
return [{
d: 1,
v: [
['m', x - 40, y, {
x: 0,
y: 1,
r: ROTATE_VERTICAL
}],
['l', 100 + x, y, {
x: 0,
y: 1,
f: 1
}],
]
}]
}
//Ç
export function getLatin9(x, y) {
return [{
d: -1,
v: [
['m', x, y, {
p: 1
}],
['b', 9.3 + x, 11.6 + y, 15.6 + x, 27.1 + y, 15.6 + x, 40.9 + y],
['b', 15.6 + x, 83.3 + y, -18.2 + x, 107.8 + y, -59.5 + x, 107.8 + y],
['b', -70.9 + x, 107.8 + y, -82.9 + x, 106.2 + y, -93.7 + x, 102.7 + y, {
x: 0.5,
f: 1
}],
]
}]
}
//Ą
export function getLatin10(x, y) {
return [{
d: -1,
v: [
['m', x, y, {
p: 1
}],
['b', 22.6 - 42.2 + x, 14.8 + y, -42.2 + x, 37.9 + y, -42.2 + x, 64.1 + y],
['b', -42.2 + x, 100.3 + y, 30.2 - 42.2 + x, 118.8 + y, 63.6 - 42.2 + x, 118.8 + y],
['b', 68.3 - 42.2 + x, 118.8 + y, 72.9 - 42.2 + x, 118.4 + y, 77.4 - 42.2 + x, 117.6 + y, {
x: 0.5,
f: 1
}],
]
}]
}
//Ċ
export function getLatin11(x, y) {
return [{
d: 1,
v: [
['a', x, y, {
x: 0,
y: 0
}],
]
}];
}
//Č
export function getLatin12(x, y) {
const tx = -68 + x;
const ty = y;
return [{
d: -1,
v: [
['m', 0 + tx, ty, {
r: getR(0 + tx, ty, 68 - VERTEX_GAP2 + tx, 50 + ty),
y: 0,
x: 0
}],
['l', 68 - VERTEX_GAP2 + tx, 50 + ty, {
r: getR(0 + tx, ty, 68 - VERTEX_GAP2 + tx, 50 + ty),
y: 0,
x: 0,
f: 1,
}],
['l', 68 + VERTEX_GAP2 + tx, 50 + ty, {
r: getR(68 + VERTEX_GAP2 + tx, 50 + ty, 68 + 68 + tx, ty),
y: 0,
x: 0,
f: 1,
v: 1
}],
['l', 68 + 68 + tx, ty, {
y: 0,
x: 0,
f: 1
}]
]
}];
}
//ď
export function getLatin13(x, y) {
return [{
d: -1,
v: [
['m', x, y, {
x: 0,
y: 0
}],
['l', x, 80 + y, {
x: 0,
y: 0,
f: 1
}],
]
}];
}
//Ē
export function getLatin14(x, y) {
return [{
d: 1,
v: [
['m', x - 50, y, {
x: 0,
y: 0
}],
['l', x + 50, y, {
x: 0,
y: 0,
f: 1
}],
]
}];
}

493
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,46 +37,9 @@ export const LOWER = {
f: 1 f: 1
}] }]
] ]
}, ] }];
),
'b': generateFontData(
600, 232, 352,
-10, -2, 0, 0,
[{
d: -1,
v: [
['m', 0, 0, {
y: 0,
r: ROTATE_HORIZONTAL
}],
['l', 0, 116 + 123, {
r: ROTATE_NONE
}],
['b', 0, 180.1 + 123, 51.9, 232 + 123, 116, 232 + 123, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 232 + 123, 232, 180.1 + 123, 232, 116 + 123, {
r: ROTATE_HORIZONTAL
}],
['b', 232, 51.9 + 123, 180.1, 0 + 123, 116, 0 + 123, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 0 + 123, 0, 51.9 + 123, 0, 116 + 123, {
r: ROTATE_HORIZONTAL
}],
['l', 0, 352, {
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}]
] export const DATA_LC = [{
}, ]
),
'c': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
[{
d: 1, d: 1,
v: [ v: [
['m', 212.1, 182.9, { ['m', 212.1, 182.9, {
@ -98,12 +57,9 @@ export const LOWER = {
}], }],
['b', 156.1, 1.1, 191.1, 21, 212.1, 51.3], ['b', 156.1, 1.1, 191.1, 21, 212.1, 51.3],
] ]
}] }];
),
'd': generateFontData( export const DATA_LD = [{
600, 232, 352,
10, 2, 0, 0,
[{
d: -1, d: -1,
v: [ v: [
['m', 232, 0, { ['m', 232, 0, {
@ -129,12 +85,9 @@ export const LOWER = {
f: 1 f: 1
}], }],
] ]
}, ] }];
),
'e': generateFontData( export const DATA_LE = [{
570, 225.5, 233.1,
0, 0, -64, -64,
[{
d: 1, d: 1,
v: [ v: [
['m', 211.6, 182.9, { ['m', 211.6, 182.9, {
@ -158,56 +111,112 @@ export const LOWER = {
p: 1 p: 1
}], }],
] ]
}] }];
),
'f': generateFontData( export const DATA_LG = [{
356, 232, 352,
-40, -40, 0, 0,
[{
d: -1, d: -1,
v: [ v: [
['m', 166.6, 33, { ['m', 232, 5, {
x: 0.5, y: -2.8
r: getCurveR(166.6, 33, 159.3, 13.1, 139.2, 0, 116.9, 0, 0)
}], }],
['b', 159.3, 13.1, 139.2, 0, 116.9, 0, { ['l', 232, 116, {
r: ROTATE_NONE
}],
['b', 232, 180.1, 180.1, 232, 116, 232, {
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
}], }],
['b', 88.2, 0, 65, 23.2, 65, 51.9, { ['b', 51.9, 232, 0, 180.1, 0, 116, {
r: ROTATE_HORIZONTAL r: ROTATE_HORIZONTAL
}], }],
['l', 65, 352, { ['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, y: 0,
f: 1 f: 1
}], }],
] ]
}, }, {
{
d: -1, d: -1,
v: [ v: [
['m', 0, 130, { ['m', 0, 91 + 123, {
x: 0, r: ROTATE_NONE
}],
['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, {
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
}], }],
['l', 154, 130, { ['b', 141.3, 0 + 123, 182, 40.7 + 123, 182, 91 + 123, {
x: 0, r: ROTATE_HORIZONTAL
}],
['l', 182, 352, {
y: 0,
f: 1 f: 1
}], }],
] ]
} }];
export const DATA_LN = [{
d: -1,
v: [
['m', 0, 130, {
y: -3.3
}],
['l', 0, 352, {
y: 0,
f: 1
}],
] ]
), }, {
'g': generateFontData(
600, 232, 338,
10, 2, -117, -117,
[{
d: -1, d: -1,
v: [ v: [
['m', 232, 5, { ['m', 0, 91 + 123, {
y: -2.8 y: 0,
r: ROTATE_HORIZONTAL,
p: 1
}], }],
['l', 232, 116, { ['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, {
r: ROTATE_NONE 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, { ['b', 232, 180.1, 180.1, 232, 116, 232, {
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
@ -219,23 +228,104 @@ export const LOWER = {
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
}], }],
['b', 180.1, 0, 232, 51.9, 232, 116, { ['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 r: ROTATE_HORIZONTAL
}], }],
['l', 232, 222], ['b', 0, 50.3 + 265, 40.7, 91 + 265, 91, 91 + 265, {
['b', 234.5, 300.3, 180.2, 338.5, 116, 338, {
y: 0.64,
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
}], }],
['b', 76.2, 337.7, 36.6, 320.7, 15.7, 290.1, { ['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, y: 0.64,
r: getCurveR(0, 331.5, 71.8, 349.6, 116.3, 248.8, 0, 331.5, 0),
f: 1 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))
), ),
'h': generateFontData( 'b': generateFontData(
520, 182, 352, 600, 232, 352,
0, 0, 0, 0, -10, -2, 0, 0,
[{ [{
d: -1, d: -1,
v: [ v: [
@ -243,29 +333,91 @@ export const LOWER = {
y: 0, y: 0,
r: ROTATE_HORIZONTAL r: ROTATE_HORIZONTAL
}], }],
['l', 0, 116 + 123, {
r: ROTATE_NONE
}],
['b', 0, 180.1 + 123, 51.9, 232 + 123, 116, 232 + 123, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 232 + 123, 232, 180.1 + 123, 232, 116 + 123, {
r: ROTATE_HORIZONTAL
}],
['b', 232, 51.9 + 123, 180.1, 0 + 123, 116, 0 + 123, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 0 + 123, 0, 51.9 + 123, 0, 116 + 123, {
r: ROTATE_HORIZONTAL
}],
['l', 0, 352, { ['l', 0, 352, {
y: 0, y: 0,
r: ROTATE_HORIZONTAL,
f: 1 f: 1
}], }]
] ]
}, { }, ]
),
'c': generateFontData(
520, 212.1, 233.1,
2, -10, -64, -64,
JSON.parse(JSON.stringify(DATA_LC))
),
'd': generateFontData(
600, 232, 352,
10, 2, 0, 0,
JSON.parse(JSON.stringify(DATA_LD))
),
'e': generateFontData(
570, 225.5, 233.1,
0, 0, -64, -64,
JSON.parse(JSON.stringify(DATA_LE))
),
'f': generateFontData(
356, 232, 352,
-40, -40, 0, 0,
[{
d: -1, d: -1,
v: [ v: [
['m', 0, 91 + 123, { ['m', 166.6, 33, {
r: ROTATE_NONE x: 0.5,
r: getCurveR(166.6, 33, 159.3, 13.1, 139.2, 0, 116.9, 0, 0)
}], }],
['b', 0, 40.7 + 123, 40.7, 0 + 123, 91, 0 + 123, { ['b', 159.3, 13.1, 139.2, 0, 116.9, 0, {
r: ROTATE_VERTICAL r: ROTATE_VERTICAL
}], }],
['b', 141.3, 0 + 123, 182, 40.7 + 123, 182, 91 + 123, { ['b', 88.2, 0, 65, 23.2, 65, 51.9, {
r: ROTATE_HORIZONTAL r: ROTATE_HORIZONTAL
}], }],
['l', 182, 352, { ['l', 65, 352, {
y: 0, y: 0,
f: 1 f: 1
}], }],
] ]
}] },
{
d: -1,
v: [
['m', 0, 130, {
x: 0,
r: ROTATE_VERTICAL
}],
['l', 154, 130, {
x: 0,
f: 1
}],
]
}
]
),
'g': generateFontData(
600, 232, 338,
10, 2, -117, -117,
JSON.parse(JSON.stringify(DATA_LG))
),
'h': generateFontData(
520, 182, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_LH))
), ),
'i': generateFontData( 'i': generateFontData(
200, 0, 352, 200, 0, 352,
@ -445,66 +597,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 +702,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 +741,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 +857,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,

329
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
@ -69,7 +68,7 @@ export const SPECIAL = {
[{ [{
d: 1, d: 1,
v: [ v: [
['a', 190.348 / 2 - 4, 360 - 4], ['a', 190.348 / 2 - 6, 356],
] ]
}, { }, {
d: -1, d: -1,
@ -90,13 +89,40 @@ export const SPECIAL = {
] ]
}] }]
), ),
'¿': generateFontData(
520, 190.348, 360,
0, -5, 0, 0,
[{
d: 1,
v: [
['a', 190.348 / 2 + 6, 356 - 451 + 188],
]
}, {
d: -1,
v: [
['m', 190.3, 173.0 + 188, {
r: getCurveR(190.3, 173.0 + 188, 178.3, 263.1 + 188, 91.2, 260.8 + 188, 190.3, 173.0 + 188, 0)
}],
['b', 190.3, 173.0 + 188, 178.3, 263.1 + 188, 91.2, 260.8 + 188, {
r: ROTATE_VERTICAL
}],
['b', 4.1, 258.4 + 188, -14.2, 185.6 + 188, 9.4, 139.4 + 188],
['b', 33.0, 93.2 + 188, 70.6, 82.5 + 188, 92.9, 37.6 + 188],
['b', 99.8, 23.7 + 188, 102.2, 11.0 + 188, 102.3, 0.0 + 188, {
r: ROTATE_HORIZONTAL,
f: 1
}],
]
}]
),
'!': generateFontData( '!': generateFontData(
465, 8, 355, 465, 8, 355,
0, -5, 0, 0, 0, -5, 0, 0,
[{ [{
d: 1, d: 1,
v: [ v: [
['a', 8 / 2, 355 - 1.5], ['a', 8 / 2, 356],
] ]
}, { }, {
d: -1, d: -1,
@ -110,6 +136,25 @@ export const SPECIAL = {
] ]
}] }]
), ),
'¡': generateFontData(
465, 8, 355,
0, -5, 0, 0,
[{
d: 1,
v: [
['a', 8 / 2, 356 - 451 + 188],
]
}, {
d: -1,
v: [
['m', 4, 0 + 188],
['l', 4, 260.8 + 188, {
f: 1,
y: 0.3
}],
]
}]
),
'$': generateFontData( '$': generateFontData(
568, 224, 360, 568, 224, 360,
0, 0, 0, 0, 0, 0, 0, 0,
@ -298,10 +343,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, {
@ -315,6 +360,162 @@ export const SPECIAL = {
] ]
}] }]
), ),
'·': generateFontData(
231, 8, 355,
0, 0, 0, 0,
[{
d: 1,
v: [
['a', 8 / 2, 355 - 1.5 - 170],
]
}]
),
'×': generateFontData(
712, 176.8, 176.8,
0, 0, 0, 0,
[{
d: -1,
v: [
['m', 0, 0, {
x: 0,
y: 0,
r: getR(0, 0, 176.8, 176.8),
}],
['l', 176.8, 176.8, {
x: 0,
y: 0,
f: 1
}],
]
}, {
d: -1,
v: [
['m', 176.8, 0, {
x: 0,
y: 0,
r: getR(176.8, 0, 0, 176.88),
}],
['l', 0, 176.8, {
x: 0,
y: 0,
f: 1
}],
]
}]
),
'÷': generateFontData(
712, 188, 0,
0, 0, 0, 0,
[{
d: 1,
v: [
['a', (188 / 2), 110],
]
}, {
d: 1,
v: [
['a', (188 / 2), -110],
]
},
{
d: -1,
v: [
['m', 0, 0, {
x: 0,
y: 0,
r: ROTATE_VERTICAL
}],
['l', 188, 0, {
x: 0,
y: 0,
f: 1
}],
]
}
]
),
'«': generateFontData(
896, 310, 236,
0, 0, 0, 0,
[{
d: 1,
v: [
['m', 150, 236, {
r: getR(150, 236, 0, 118 + VERTEX_GAP2),
f: 1
}],
['l', 0, 118 + VERTEX_GAP2, {
r: getR(150, 236, 0, 118 + VERTEX_GAP2),
f: 1
}],
['l', 0, 118 - VERTEX_GAP2, {
r: getR(0, 118 - VERTEX_GAP2, 150, 0),
f: 1,
v: 1
}],
['l', 150, 0]
]
}, {
d: 1,
v: [
['m', 150 + 160, 236, {
r: getR(150 + 160, 236, 0 + 160, 118 + VERTEX_GAP2),
f: 1
}],
['l', 0 + 160, 118 + VERTEX_GAP2, {
r: getR(150 + 160, 236, 0 + 160, 118 + VERTEX_GAP2),
f: 1
}],
['l', 0 + 160, 118 - VERTEX_GAP2, {
r: getR(0 + 160, 118 - VERTEX_GAP2, 150 + 160, 0),
f: 1,
v: 1
}],
['l', 150 + 160, 0]
]
}]
),
'»': generateFontData(
896, 310, 236,
0, 0, 0, 0,
[{
d: 1,
v: [
['m', 0, 236, {
r: getR(0, 236, 150, 118 + VERTEX_GAP2),
f: 1
}],
['l', 150, 118 + VERTEX_GAP2, {
r: getR(0, 236, 0, 118 + VERTEX_GAP2),
f: 1
}],
['l', 150, 118 - VERTEX_GAP2, {
r: getR(150, 118 - VERTEX_GAP2, 0, 0),
f: 1,
v: 1
}],
['l', 0, 0]
]
}, {
d: 1,
v: [
['m', 0 + 160, 236, {
r: getR(0 + 160, 236, 150 + 160, 118 + VERTEX_GAP2),
f: 1
}],
['l', 150 + 160, 118 + VERTEX_GAP2, {
r: getR(0, 236, 0, 118 + VERTEX_GAP2),
f: 1
}],
['l', 150 + 160, 118 - VERTEX_GAP2, {
r: getR(150 + 160, 118 - VERTEX_GAP2, 0 + 160, 0),
f: 1,
v: 1
}],
['l', 0 + 160, 0]
]
}]
),
'&': generateFontData( '&': generateFontData(
660, 259.191, 360, 660, 259.191, 360,
0, 0, 0, 0, 0, 0, 0, 0,
@ -886,5 +1087,119 @@ export const SPECIAL = {
}] }]
] ]
}] }]
) ),
'þ': generateFontData(
600, 232, 338,
-10, -2, -117, -117,
[{
d: -1,
v: [
['m', 0, -106, {
y: 0
}],
['l', 0, 116, {
r: ROTATE_NONE
}],
['b', 0, 180.1, 51.9, 232, 116, 232, {
r: ROTATE_VERTICAL
}],
['b', 180.1, 232, 232, 180.1, 232, 116, {
r: ROTATE_HORIZONTAL
}],
['b', 232, 51.9, 180.1, 0, 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 51.9, 0, 0, 51.9, 0, 116, {
r: ROTATE_HORIZONTAL
}],
['l', 0, 338, {
y: 0,
f: 1
}],
]
}]
),
'Þ': generateFontData(
520, 162, 352,
-5, -70, 0, 0,
[{
d: -1,
v: [
['m', 0, 0, {
x: 0,
y: 0,
r: ROTATE_HORIZONTAL,
}],
['l', 0, 352, {
x: 0,
y: 0,
r: ROTATE_HORIZONTAL,
f: 1
}],
]
},
{
d: 1,
v: [
['m', 0, 281.6, {
x: 0,
r: ROTATE_VERTICAL,
f: 1,
p: 1
}],
['l', 57, 281.6, {
x: -0.5,
r: ROTATE_VERTICAL,
f: 1
}],
['b', 115.0, 281.6, 162.0, 233.4, 162.0, 175.4, {
x: -0.5,
r: ROTATE_HORIZONTAL
}],
['b', 162.0, 117.4, 115.0, 70.4, 57.0, 70.4, {
x: -0.5,
r: ROTATE_VERTICAL
}],
['l', 0, 70.4, {
x: 0,
r: ROTATE_VERTICAL,
f: 1,
p: 1
}],
]
}
]
),
'ß': generateFontData(
596, 209, 352,
-10, -10, 0, 0,
[{
d: 1,
v: [
['m', 0.0, 348.3, {
r: ROTATE_HORIZONTAL,
f: 1,
x: 0,
y: 0
}],
['l', 0.0, 104.3, {
x: 0
}],
['b', 0.0, 46.0, 36.0, 0.0, 98.9, 0.0, {
x: 0
}],
['b', 145.2, 0.0, 191.0, 27.9, 191.0, 81.0, {
x: 1
}],
['b', 191.0, 110.7, 165.6, 131.8, 151.8, 140.9],
['l', 140.0, 148.8],
['b', 120.6, 161.7, 110.8, 172.8, 110.8, 185.5],
['b', 110.8, 206.7, 131.6, 213.8, 140.0, 217.5],
//['l', 163.7, 228.6],
['b', 190.6, 241.1, 211.0, 262.7, 211.0, 289.6],
['b', 211.0, 329.5, 174.8, 352.0, 142.5, 352.0],
['b', 97.3, 352.0, 75.2, 319.7, 72.3, 289.3],
]
}]
),
}; };

540
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,53 +46,9 @@ export const UPPER = {
}], }],
] ]
} }
] ];
),
'B': generateFontData( export const DATA_UC = [{
596, 209, 352,
-10, -10, 0, 0,
[{
d: 1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1
}],
['l', 116, 164, {
r: ROTATE_VERTICAL,
p: 1,
f: 1
}],
['b', 167.4, 164, 209, 205.6, 209, 257, {
r: ROTATE_HORIZONTAL
}],
['b', 209, 308.4, 167.4, 352, 116, 352, {
r: ROTATE_VERTICAL
}],
['l', 0, 352, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0, 0, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 161.3, 0, 198, 36.7, 198, 82, {
r: ROTATE_HORIZONTAL
}],
['b', 198, 127.3, 161.3, 164, 116, 164, {
r: ROTATE_VERTICAL
}]
]
}]
),
'C': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
[{
d: 1, d: 1,
v: [ v: [
['m', 293.1, 320.1, { ['m', 293.1, 320.1, {
@ -109,13 +60,9 @@ export const UPPER = {
['b', 0, 80.6, 80.6, 0, 180, 0], ['b', 0, 80.6, 80.6, 0, 180, 0],
['b', 222.8, 0, 262.2, 15, 293.1, 39.9], ['b', 222.8, 0, 262.2, 15, 293.1, 39.9],
] ]
}] }];
),
'D': generateFontData( export const DATA_UD = [{
721, 270, 352,
-10, -10, 0, 0,
[{
//c: 'square',
d: -1, d: -1,
v: [ v: [
['m', 95, 352, { ['m', 95, 352, {
@ -141,12 +88,9 @@ export const UPPER = {
f: 1 f: 1
}], }],
] ]
}] }];
),
'E': generateFontData( export const DATA_UE = [{
520, 192, 352,
-5, -80, 0, 0,
[{
d: -1, d: -1,
v: [ v: [
['m', 192, 0, { ['m', 192, 0, {
@ -184,51 +128,9 @@ export const UPPER = {
}], }],
] ]
} }
] ];
),
'F': generateFontData( export const DATA_UG = [{
510, 192, 352,
-5, -80, 0, 0,
[{
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, {
y: 0,
f: 1,
x: 0.5
}],
]
},
{
d: -1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1,
x: 0.5
}],
['l', 180, 164, {
x: 0,
r: ROTATE_VERTICAL,
f: 1
}],
]
}
]
),
'G': generateFontData(
840, 352, 360,
0, 0, 0, 0,
[{
d: 1, d: 1,
v: [ v: [
['m', 202, 180, { ['m', 202, 180, {
@ -249,12 +151,9 @@ export const UPPER = {
}], }],
['b', 222.8, 0, 262.1, 14.9, 293, 39.9], ['b', 222.8, 0, 262.1, 14.9, 293, 39.9],
] ]
}] }];
),
'H': generateFontData( export const DATA_UH = [{
684, 232, 352,
0, 0, 0, 0,
[{
d: -1, d: -1,
v: [ v: [
['m', 0, 0, { ['m', 0, 0, {
@ -295,13 +194,10 @@ export const UPPER = {
p: 1 p: 1
}], }],
] ]
}, }
] ];
),
'I': generateFontData( export const DATA_UI = [{
249, 0, 352,
0, 0, 0, 0,
[{
d: 1, d: 1,
v: [ v: [
['m', 0, 352, { ['m', 0, 352, {
@ -314,12 +210,9 @@ export const UPPER = {
r: ROTATE_HORIZONTAL r: ROTATE_HORIZONTAL
}], }],
] ]
}, ] }];
),
'J': generateFontData( export const DATA_UJ = [{
472, 172.5, 355.5,
10, 20, -2, -2,
[{
d: 1, d: 1,
v: [ v: [
['m', 0, 310.5 + 0.5, { ['m', 0, 310.5 + 0.5, {
@ -335,7 +228,260 @@ export const UPPER = {
r: ROTATE_HORIZONTAL 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(
596, 209, 352,
-10, -10, 0, 0,
[{
d: 1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1
}],
['l', 116, 164, {
r: ROTATE_VERTICAL,
p: 1,
f: 1
}],
['b', 167.4, 164, 209, 205.6, 209, 257, {
r: ROTATE_HORIZONTAL
}],
['b', 209, 308.4, 167.4, 352, 116, 352, {
r: ROTATE_VERTICAL
}],
['l', 0, 352, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 0, 0, {
r: ROTATE_HORIZONTAL,
f: 1
}],
['l', 116, 0, {
r: ROTATE_VERTICAL
}],
['b', 161.3, 0, 198, 36.7, 198, 82, {
r: ROTATE_HORIZONTAL
}],
['b', 198, 127.3, 161.3, 164, 116, 164, {
r: ROTATE_VERTICAL
}]
]
}]
),
'C': generateFontData(
700, 293.1, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UC))
),
'D': generateFontData(
721, 270, 352,
-10, -10, 0, 0,
JSON.parse(JSON.stringify(DATA_UD))
),
'E': generateFontData(
520, 192, 352,
-5, -80, 0, 0,
JSON.parse(JSON.stringify(DATA_UE))
),
'F': generateFontData(
510, 192, 352,
-5, -80, 0, 0,
[{
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, {
y: 0,
f: 1,
x: 0.5
}],
]
},
{
d: -1,
v: [
['m', 0, 164, {
r: ROTATE_VERTICAL,
p: 1,
x: 0.5
}],
['l', 180, 164, {
x: 0,
r: ROTATE_VERTICAL,
f: 1
}],
]
}
]
),
'G': generateFontData(
840, 352, 360,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UG))
),
'H': generateFontData(
684, 232, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UH))
),
'I': generateFontData(
249, 0, 352,
0, 0, 0, 0,
JSON.parse(JSON.stringify(DATA_UI))
),
'J': generateFontData(
472, 172.5, 355.5,
10, 20, -2, -2,
JSON.parse(JSON.stringify(DATA_UJ))
), ),
'K': generateFontData( 'K': generateFontData(
616, 232, 352, 616, 232, 352,
@ -449,67 +595,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 +723,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 +761,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 +875,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.3
* DATE: 2019-09-13
* 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