Skip to content

Commit

Permalink
embed Source Code Pro as a web font
Browse files Browse the repository at this point in the history
The blocks that comprise the logo are now reliably the same width as the
lettering in a *fixed-width font*, so no more weird skewed logos on
Chrome for Android.
  • Loading branch information
MikkelPaulson committed Aug 5, 2021
1 parent a03db63 commit 9bd2b02
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions data/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* **Enhancement:** Adopted Source Code Pro for the interface font. Most
importantly, the common font ensures that the blocks in the logo are always
the same width.
* **Bug:** Fixed the page not scrolling predictably. Scrolling behaviour should
also respect browsers configured to prefer reduced motion.
* **Enhancement:** Added equipment, all of the essentials like `Dagger` and
Expand Down
13 changes: 12 additions & 1 deletion web/www/package-lock.json

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

3 changes: 2 additions & 1 deletion web/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"dependencies": {
"@tarekraafat/autocomplete.js": "^10.2.6",
"initiative-web": "file:../pkg",
"marked": "^2.1.3"
"marked": "^2.1.3",
"source-code-pro": "^2.38.0"
},
"devDependencies": {
"copy-webpack-plugin": "^9.0.1",
Expand Down
2 changes: 1 addition & 1 deletion web/www/public/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* {
font-family: monospace;
font-family: "Source Code Pro";
font-size: 100%;
line-height: 1.2rem;
}
Expand Down
4 changes: 4 additions & 0 deletions web/www/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ module.exports = {
}),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, "node_modules/source-code-pro"),
to: path.resolve(__dirname, "dist/source-code-pro"),
},
{
from: path.resolve(__dirname, "public/*.css"),
to: path.resolve(__dirname, "dist/[name].[contenthash][ext]"),
Expand Down

0 comments on commit 9bd2b02

Please sign in to comment.