feat: use Atkinson font

This commit is contained in:
Mateusz 2025-08-10 11:45:01 +02:00
parent b27ef82193
commit 8e3d070826
5 changed files with 21 additions and 3 deletions

5
.gitignore vendored
View File

@ -6,5 +6,6 @@ lib
coverage coverage
@types @types
public/*.js public/bundle.*
/public/bundle.js.map public/*.woff
public/*.woff2

10
package-lock.json generated
View File

@ -10,6 +10,7 @@
"hasInstallScript": true, "hasInstallScript": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fontsource/atkinson-hyperlegible": "^5.2.6",
"@types/mocha": "^10.0.1", "@types/mocha": "^10.0.1",
"@types/node": "^20.10.4", "@types/node": "^20.10.4",
"@types/yargs": "^17.0.32", "@types/yargs": "^17.0.32",
@ -900,6 +901,15 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
} }
}, },
"node_modules/@fontsource/atkinson-hyperlegible": {
"version": "5.2.6",
"resolved": "https://registry.npmjs.org/@fontsource/atkinson-hyperlegible/-/atkinson-hyperlegible-5.2.6.tgz",
"integrity": "sha512-Kfh6/UlHhotKuv4Oi9PXQIsmzwbtJIR442sSJnEHsO7TDZaDczK8cY0AlTNOB0XMDZj1j35nAlgbi2HZCdNg/Q==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@humanwhocodes/config-array": { "node_modules/@humanwhocodes/config-array": {
"version": "0.11.8", "version": "0.11.8",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",

View File

@ -7,13 +7,14 @@
"test": "mocha", "test": "mocha",
"build": "npm run build-node && npm run build-browser", "build": "npm run build-node && npm run build-browser",
"build-node": "tsc", "build-node": "tsc",
"build-browser": "esbuild src/browser.ts --bundle --minify --sourcemap --target=firefox120 --outfile=public/bundle.js", "build-browser": "esbuild src/browser.ts --bundle --minify --sourcemap --target=firefox120 --outfile=public/bundle.js --loader:.woff=file --loader:.woff2=file",
"postinstall": "npm run build", "postinstall": "npm run build",
"clean-coverage": "rm -rf coverage .nyc_output .xunit", "clean-coverage": "rm -rf coverage .nyc_output .xunit",
"coverage": "npm run clean-coverage && nyc mocha", "coverage": "npm run clean-coverage && nyc mocha",
"test-reports": "npm run clean-coverage && nyc --reporter clover mocha --reporter xunit --reporter-option output=.xunit", "test-reports": "npm run clean-coverage && nyc --reporter clover mocha --reporter xunit --reporter-option output=.xunit",
"coverage-html": "npm run test-reports && nyc report --reporter lcov && xdg-open coverage/lcov-report/index.html", "coverage-html": "npm run test-reports && nyc report --reporter lcov && xdg-open coverage/lcov-report/index.html",
"start": "http-server public -p 8080", "start": "http-server public -p 8080",
"dev": "esbuild src/browser.ts --bundle --outfile=public/bundle.js --watch --loader:.woff=file --loader:.woff2=file & http-server public -p 8080",
"format": "prettier --write .", "format": "prettier --write .",
"format:check": "prettier --check ." "format:check": "prettier --check ."
}, },
@ -38,6 +39,7 @@
}, },
"types": "./@types/index.d.ts", "types": "./@types/index.d.ts",
"dependencies": { "dependencies": {
"@fontsource/atkinson-hyperlegible": "^5.2.6",
"@types/mocha": "^10.0.1", "@types/mocha": "^10.0.1",
"@types/node": "^20.10.4", "@types/node": "^20.10.4",
"@types/yargs": "^17.0.32", "@types/yargs": "^17.0.32",

View File

@ -1,3 +1,7 @@
:root {
--pico-font-family: "Atkinson Hyperlegible", sans-serif;
}
body { body {
max-width: 600px; max-width: 600px;
margin: 0 auto; margin: 0 auto;

View File

@ -1,4 +1,5 @@
import { convert } from "."; import { convert } from ".";
import "@fontsource/atkinson-hyperlegible";
function download(data: string, filename: string, type: string) { function download(data: string, filename: string, type: string) {
var file = new Blob([data], { type: type }); var file = new Blob([data], { type: type });