Skip to content

Commit

Permalink
Add new font for German (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Dec 27, 2024
1 parent 9a3313e commit ca6c90d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 0 deletions.
Binary file added public/fonts/WalbaumFraktur-Bold.ttf
Binary file not shown.
Binary file added public/fonts/WalbaumFraktur-Inline-Bold.ttf
Binary file not shown.
Binary file added public/fonts/WalbaumFraktur-Shadow-Bold.ttf
Binary file not shown.
Binary file added public/fonts/WalbaumFraktur.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions src/components/PostCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const fontSwitch = {
'font-SweynheimPannartz': entry.data.font == 'SweynheimPannartz',
'font-PangZhonghuaXingKai': entry.data.font == 'PangZhonghuaXingKai',
'font-DXRedMailboxBold': entry.data.font == 'DXRedMailboxBold',
'font-WalbaumFraktur': entry.data.font == 'WalbaumFraktur',
'font-Porson': entry.data.font == 'Porson',
'font-Ubuntu': entry.data.font == 'Ubuntu' || entry.data.font == null
}
Expand Down Expand Up @@ -116,6 +117,14 @@ const fontSwitch = {
</style>

<style is:global>
@font-face {
font-family: 'WalbaumFraktur';
src: url('/fonts/WalbaumFraktur.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'DXRedMailboxBold';
src: url('/fonts/DXRedMailboxBold.ttf') format('truetype');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ image: cover.png
tags: [Philosophy]
category: German
draft: false
font: WalbaumFraktur
---

Die Transscendentale Aesthetik
Expand Down
9 changes: 9 additions & 0 deletions src/pages/posts/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const fontSwitch = {
'font-SweynheimPannartz': entry.data.font == 'SweynheimPannartz',
'font-PangZhonghuaXingKai': entry.data.font == 'PangZhonghuaXingKai',
'font-DXRedMailboxBold': entry.data.font == 'DXRedMailboxBold',
'font-WalbaumFraktur': entry.data.font == 'WalbaumFraktur',
'font-Porson': entry.data.font == 'Porson',
'font-Ubuntu': entry.data.font == 'Ubuntu' || entry.data.font == null
}
Expand Down Expand Up @@ -156,6 +157,14 @@ const jsonLd = {
</MainGridLayout>

<style is:global>
@font-face {
font-family: 'WalbaumFraktur';
src: url('/fonts/WalbaumFraktur.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'DXRedMailboxBold';
src: url('/fonts/DXRedMailboxBold.ttf') format('truetype');
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
fontFamily: {
sans: ["Ubuntu", "sans-serif", ...defaultTheme.fontFamily.sans],
Ubuntu: ["Ubuntu", "sans-serif", ...defaultTheme.fontFamily.sans],
WalbaumFraktur: ["WalbaumFraktur"],
SweynheimPannartz: ["SweynheimPannartz", "SweynheimPannartz", "SweynheimPannartz"],
PangZhonghuaXingKai: ["PangZhonghuaXingKai"],
DXRedMailboxBold: ["DXRedMailboxBold", "DXRedMailboxBold", "DXRedMailboxBold"],
Expand Down

0 comments on commit ca6c90d

Please sign in to comment.