Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .nix/pkgs/graphite.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,15 @@ let
// {
cargoArtifacts = deps.crane.lib.buildDepsOnly resourcesCommon;

# TODO: Remove the need for this hash by using individual package resolutions and hashes from package-lock.json
npmDeps = pkgs.fetchNpmDeps {
inherit (info) pname version;
src = "${info.src}/frontend";
hash = "sha256-WlwzWGoFi3hjRuM5ucrgavko/gg4iFAwMc6uMLjT/FI=";
npmDeps = pkgs.importNpmLock {
npmRoot = "${info.src}/frontend";
};

npmRoot = "frontend";
npmConfigScript = "setup";
makeCacheWritable = true;

nativeBuildInputs = tools.frontend ++ [ pkgs.npmHooks.npmConfigHook ];
nativeBuildInputs = tools.frontend ++ [ pkgs.importNpmLock.npmConfigHook ];

prePatch = ''
mkdir branding
Expand Down
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"cSpell.language": "en-US",
"cSpell.logLevel": "Information",
"cSpell.allowCompoundWords": true,
// Other extensions config
"evenBetterToml.formatter.alignComments": false,
"package-json-upgrade.ignorePatterns": ["source-sans-pro"],
// VS Code config
"html.format.wrapLineLength": 200,
"files.eol": "\n",
Expand All @@ -75,6 +78,5 @@
"*.graphite": "json"
},
"editor.renderWhitespace": "boundary",
"editor.minimap.markSectionHeaderRegex": "// ===+\\n\\s*//\\s*(?<label>[^\\n]{1,18})[^\\n]*(\\n\\s*//[^\\n]*)*\\n\\s*// ===+",
"evenBetterToml.formatter.alignComments": false
"editor.minimap.markSectionHeaderRegex": "// ===+\\n\\s*//\\s*(?<label>[^\\n]{1,18})[^\\n]*(\\n\\s*//[^\\n]*)*\\n\\s*// ===+"
}
2 changes: 1 addition & 1 deletion frontend/branding-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function main() {
const url = lines[0];
const expectedHash = lines[1];

console.log(`Downloading branding assets from ${url}...`);
console.log(`Downloading branding assets from <${url}>...`);

try {
await downloadFile(url, TEMP_FILE);
Expand Down
18 changes: 10 additions & 8 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
"wasm:watch-profiling": "cargo watch --postpone --watch-when-idle --workdir=wasm --shell \"wasm-pack build . --profiling --target=web -- --color=always\"",
"wasm:watch-production": "cargo watch --postpone --watch-when-idle --workdir=wasm --shell \"wasm-pack build . --release --target=web -- --color=always\""
},
"//": "NOTE: `source-sans-pro` is never to be upgraded to 3.x because that renders a pixel above its intended position.",
"dependencies": {
"class-transformer": "^0.5.1",
"idb-keyval": "^6.2.2",
"reflect-metadata": "^0.2.2",
"source-code-pro": "github:adobe-fonts/source-code-pro#2.042R-u/1.062R-i/1.026R-vf",
"source-sans": "github:adobe-fonts/source-sans#2.045R-ro%2F1.095R-it"
"source-code-pro": "2.42.0",
"source-sans-pro": "2.45.0"
},
"devDependencies": {
"@eslint/compat": "^2.0.1",
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -331,31 +331,31 @@
font-weight: 400;
font-style: normal;
font-stretch: normal;
src: url("@graphite/../node_modules/source-sans/WOFF2/TTF/SourceSansPro-Regular.ttf.woff2") format("woff2");
src: url("@graphite/../node_modules/source-sans-pro/WOFF2/TTF/SourceSansPro-Regular.ttf.woff2") format("woff2");
}

@font-face {
font-family: "Source Sans Pro";
font-weight: 400;
font-style: italic;
font-stretch: normal;
src: url("@graphite/../node_modules/source-sans/WOFF2/TTF/SourceSansPro-It.ttf.woff2") format("woff2");
src: url("@graphite/../node_modules/source-sans-pro/WOFF2/TTF/SourceSansPro-It.ttf.woff2") format("woff2");
}

@font-face {
font-family: "Source Sans Pro";
font-weight: 700;
font-style: normal;
font-stretch: normal;
src: url("@graphite/../node_modules/source-sans/WOFF2/TTF/SourceSansPro-Bold.ttf.woff2") format("woff2");
src: url("@graphite/../node_modules/source-sans-pro/WOFF2/TTF/SourceSansPro-Bold.ttf.woff2") format("woff2");
}

@font-face {
font-family: "Source Sans Pro";
font-weight: 700;
font-style: italic;
font-stretch: normal;
src: url("@graphite/../node_modules/source-sans/WOFF2/TTF/SourceSansPro-BoldIt.ttf.woff2") format("woff2");
src: url("@graphite/../node_modules/source-sans-pro/WOFF2/TTF/SourceSansPro-BoldIt.ttf.woff2") format("woff2");
}

@font-face {
Expand Down
4 changes: 2 additions & 2 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ function generateAdditionalLicenses(): LicenseInfo[] {
const ADDITIONAL_LICENSES = [
{
licenseName: "SIL Open Font License 1.1",
licenseTextPath: "node_modules/source-sans/LICENSE.txt",
manifestPath: "node_modules/source-sans/package.json",
licenseTextPath: "node_modules/source-sans-pro/LICENSE.txt",
manifestPath: "node_modules/source-sans-pro/package.json",
},
{
licenseName: "SIL Open Font License 1.1",
Expand Down