Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local fonts + SF typography #544

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
33 changes: 33 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"license": "MIT",
"private": true,
"dependencies": {
"@fontsource/encode-sans": "^4.5.9",
"@fontsource/encode-sans-condensed": "^4.5.9",
"@fontsource/exo": "^4.5.10",
"@league-of-foundry-developers/foundry-vtt-types": "^9.269.0",
"@tinymce/tinymce-vue": "^5.0.0",
"@types/lodash": "^4.14.170",
Expand Down
1 change: 0 additions & 1 deletion src/module/vue/components/rules-text/rules-text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</template>
<style lang="less">
@import (reference) '../../../../styles/mixins.less';

.rules-text {
--ironsworn-rules-text-spacer: 0.5em;
display: flex;
Expand Down
4 changes: 4 additions & 0 deletions src/styles/assets.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import (reference) './themes/mixins/decorations.less';
@import (reference) './mixins.less';

@asset_spacer: 0.5em;

Expand Down Expand Up @@ -32,6 +33,7 @@
line-height: 1;
font-style: italic;
transition: inherit;
.textCompactMixin();
}
.asset-controls {
justify-items: flex-end;
Expand Down Expand Up @@ -59,6 +61,7 @@
.asset-field-label {
padding: 0;
margin: 0;
.textCompactMixin();
}
.asset-field-value {
margin: 0;
Expand All @@ -75,6 +78,7 @@
display: flex;
flex-direction: row;
gap: @asset_spacer;
.textCompactMixin();
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/styles/fvtt/tooltip.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import (reference) '../mixins.less';

#tooltip {
// TODO: currently this isn't really changing much, but i'd like to revisit it for the dark theme.
background: var(--ironsworn-color-dark-90);
Expand All @@ -9,4 +11,5 @@
border-radius: 3px;
box-shadow: 0 0 4px #000;
pointer-events: none;
.textCompactMixin();
}
9 changes: 9 additions & 0 deletions src/styles/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,12 @@
}
}
}

.textCompactMixin {
font-family: var(--font-compact);
letter-spacing: 0.015em;
word-spacing: 0.015em;
}

.textDisplayMixin {
}
6 changes: 5 additions & 1 deletion src/styles/themes/starforged.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Dark theme for Starforged, with aggressive restyling of FVTT's stock UX elements.

@import '@fontsource/encode-sans-condensed/latin';
@import '@fontsource/encode-sans/latin';
@import './starforged-font.css'; // HACK to avoid import error
@import (reference) '../mixins.less';
@import (reference) './mixins/colors.less';
Expand All @@ -13,7 +15,9 @@
.ironswornDarkThemeMixin(ironsworn-color);
.softBorderMixin(ironsworn-color);
.interactiveTintMixin(ironsworn-color-clickable-block,ironsworn-color);
--font-primary: 'Carrois Gothic SC', sans-serif;
// --font-primary: 'Carrois Gothic SC', sans-serif;
--font-primary: 'Encode Sans', sans-serif;
--font-compact: 'Encode Sans Condensed', sans-serif;

--ironsworn-color-text-stroke: var(--ironsworn-color-bg);

Expand Down