Skip to content

Commit

Permalink
Add "PT Sans" and sans-serif as fallback font-family
Browse files Browse the repository at this point in the history
  • Loading branch information
albig committed Aug 8, 2024
1 parent b5e34e3 commit 21e52c5
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 89 deletions.
2 changes: 1 addition & 1 deletion sass/_archives.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
a {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down
4 changes: 2 additions & 2 deletions sass/_event.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ a.event-card {
color: $darkgray;

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

border-bottom: 1px solid $lightgray;
Expand All @@ -31,7 +31,7 @@ a.event-card {
.date {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down
56 changes: 0 additions & 56 deletions sass/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,6 @@
font-display: swap;
}

@font-face {
font-family: PTSans;
src: url("assets/fonts/PTSans-Regular.eot");
src:
url("assets/fonts/PTSans-Regular.eot?#iefix") format("embedded-opentype"),
url("assets/fonts/PTSans-Regular.woff2") format("woff2"),
url("assets/fonts/PTSans-Regular.woff") format("woff"),
url("assets/fonts/PTSans-Regular.ttf") format("truetype"),
url("assets/fonts/PTSans-Regular.svg#PTSans-Regular") format("svg");
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: PTSans;
src: url("assets/fonts/PTSans-Bold.eot");
src:
url("assets/fonts/PTSans-Bold.eot?#iefix") format("embedded-opentype"),
url("assets/fonts/PTSans-Bold.woff2") format("woff2"),
url("assets/fonts/PTSans-Bold.woff") format("woff"),
url("assets/fonts/PTSans-Bold.ttf") format("truetype"),
url("assets/fonts/PTSans-Bold.svg#PTSans-Bold") format("svg");
font-weight: 700;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: PTSans;
src: url("assets/fonts/PTSans-BoldItalic.eot");
src:
url("assets/fonts/PTSans-BoldItalic.eot?#iefix") format("embedded-opentype"),
url("assets/fonts/PTSans-BoldItalic.woff2") format("woff2"),
url("assets/fonts/PTSans-BoldItalic.woff") format("woff"),
url("assets/fonts/PTSans-BoldItalic.ttf") format("truetype"),
url("assets/fonts/PTSans-BoldItalic.svg#PTSans-BoldItalic") format("svg");
font-weight: 700;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: PTSans;
src: url("assets/fonts/PTSans-Italic.eot");
src:
url("assets/fonts/PTSans-Italic.eot?#iefix") format("embedded-opentype"),
url("assets/fonts/PTSans-Italic.woff2") format("woff2"),
url("assets/fonts/PTSans-Italic.woff") format("woff"),
url("assets/fonts/PTSans-Italic.ttf") format("truetype"),
url("assets/fonts/PTSans-Italic.svg#PTSans-Italic") format("svg");
font-weight: 400;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: ForkAwesome;
font-style: normal;
Expand Down
2 changes: 1 addition & 1 deletion sass/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ body {
&-name {

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

font-weight: 500;
Expand Down
4 changes: 2 additions & 2 deletions sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {
body {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}
}

Expand Down Expand Up @@ -160,7 +160,7 @@ button.filter,
a.eventlist {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down
6 changes: 3 additions & 3 deletions sass/_themes.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$themes: (
default: ("headingFont": "GrueneType", "headingFontBold": "GrueneType", "standardFont": "PTSans", "secondaryFont": sans-serif),
contrast: ("headingFont": "GrueneType", "headingFontBold": "GrueneType", "standardFont": "PTSans", "secondaryFont": sans-serif)
default: ("headingFont": "GrueneType", "headingFontBold": "GrueneType", "standardFont": "PTSans, \"PT Sans\", sans-serif"),
contrast: ("headingFont": "GrueneType", "headingFontBold": "GrueneType", "standardFont": "PTSans \"PT Sans\", sans-serif")
);

@mixin themed() {
Expand All @@ -22,7 +22,7 @@ $themes: (

@function t($key) {

@return map-get($theme-map, $key);
@return unquote(map-get($theme-map, $key));
}

.theme--contrast {
Expand Down
20 changes: 10 additions & 10 deletions sass/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ h6,
.roofline {

@include themed() {
font-family: t("headingFont");
font-family: t(headingFont);
}

&-single {

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}
}

Expand All @@ -45,7 +45,7 @@ h1,
.has-huge-font-size {

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

font-size: 36px;
Expand All @@ -57,7 +57,7 @@ h2,
.has-large-font-size {

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

font-size: 27px;
Expand All @@ -69,7 +69,7 @@ h3,
.has-medium-font-size {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand All @@ -89,7 +89,7 @@ h4,
.h4 {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand All @@ -100,7 +100,7 @@ h5,
.h5 {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand All @@ -111,7 +111,7 @@ h6,
.h6 {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down Expand Up @@ -173,7 +173,7 @@ h6,
text-transform: uppercase;

@include themed() {
font-family: t("headingFont");
font-family: t(headingFont);
}

&::before {
Expand Down Expand Up @@ -213,7 +213,7 @@ h6,
font-size: 30pt;

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

padding: 8pt;
Expand Down
4 changes: 2 additions & 2 deletions sass/_widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
&-title {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down Expand Up @@ -69,7 +69,7 @@
&.wp-block-search__label {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down
2 changes: 1 addition & 1 deletion sass/wp-blocks/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
border-radius: 3px;

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

&:hover {
Expand Down
2 changes: 1 addition & 1 deletion sass/wp-blocks/cover.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.entry-content > .wp-block-cover {

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

margin-left: calc(50% - 50vw);
Expand Down
4 changes: 2 additions & 2 deletions sass/wp-blocks/person.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
font-weight: 700;

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}
}
}
Expand All @@ -21,7 +21,7 @@
font-weight: 700;

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

margin-bottom: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion sass/wp-blocks/quote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
p {

@include themed() {
font-family: t("headingFontBold");
font-family: t(headingFontBold);
}

font-size: 23px;
Expand Down
2 changes: 1 addition & 1 deletion sass/wp-blocks/rss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
&-title {

@include themed() {
font-family: t("standardFont"), t(secondaryFont);
font-family: t(standardFont);
}

font-weight: 700;
Expand Down
12 changes: 6 additions & 6 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
{
"fontFace": [
{
"fontFamily": "PT Sans",
"fontFamily": "PTSans",
"fontStretch": "normal",
"fontStyle": "normal",
"fontWeight": "400",
Expand All @@ -79,7 +79,7 @@
]
},
{
"fontFamily": "PT Sans",
"fontFamily": "PTSans",
"fontStretch": "normal",
"fontStyle": "italic",
"fontWeight": "400",
Expand All @@ -88,7 +88,7 @@
]
},
{
"fontFamily": "PT Sans",
"fontFamily": "PTSans",
"fontStretch": "normal",
"fontStyle": "normal",
"fontWeight": "700",
Expand All @@ -97,7 +97,7 @@
]
},
{
"fontFamily": "PT Sans",
"fontFamily": "PTSans",
"fontStretch": "normal",
"fontStyle": "italic",
"fontWeight": "700",
Expand All @@ -106,8 +106,8 @@
]
}
],
"fontFamily": "\"PT Sans\", sans-serif",
"name": "PT Sans",
"fontFamily": "PTSans, \"PT Sans\", sans-serif",
"name": "PTSans",
"slug": "pt-sans"
},
{
Expand Down

0 comments on commit 21e52c5

Please sign in to comment.