Use the new `gg sans` font

pull/1003/head
Tyrrrz 2 years ago
parent b51900ec6a
commit 83e3289ead

@ -15,8 +15,8 @@
? darkVariant ? darkVariant
: lightVariant; : lightVariant;
string GetFontUrl(int weight) => string GetFontUrl(string style, int weight) =>
$"https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/whitney-{weight}.woff"; $"https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-{style}-{weight}.woff2";
ValueTask<string> ResolveAssetUrlAsync(string url) => ValueTask<string> ResolveAssetUrlAsync(string url) =>
Context.ResolveAssetUrlAsync(url, CancellationToken); Context.ResolveAssetUrlAsync(url, CancellationToken);
@ -41,33 +41,73 @@
@{/* Styling */} @{/* Styling */}
<style> <style>
@@font-face { @@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl(300))); src: url(@await ResolveAssetUrlAsync(GetFontUrl("normal", 400)));
font-family: Whitney; font-family: gg sans;
font-weight: 300; font-weight: 400;
font-style: normal;
}
@@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl("normal", 500)));
font-family: gg sans;
font-weight: 500;
font-style: normal;
} }
@@font-face { @@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl(400))); src: url(@await ResolveAssetUrlAsync(GetFontUrl("normal", 600)));
font-family: Whitney; font-family: gg sans;
font-weight: 600;
font-style: normal;
}
@@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl("normal", 700)));
font-family: gg sans;
font-weight: 700;
font-style: normal;
}
@@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl("normal", 800)));
font-family: gg sans;
font-weight: 800;
font-style: normal;
}
@@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl("italic", 400)));
font-family: gg sans;
font-weight: 400; font-weight: 400;
font-style: italic;
} }
@@font-face { @@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl(500))); src: url(@await ResolveAssetUrlAsync(GetFontUrl("italic", 500)));
font-family: Whitney; font-family: gg sans;
font-weight: 500; font-weight: 500;
font-style: italic;
} }
@@font-face { @@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl(600))); src: url(@await ResolveAssetUrlAsync(GetFontUrl("italic", 600)));
font-family: Whitney; font-family: gg sans;
font-weight: 600; font-weight: 600;
font-style: italic;
} }
@@font-face { @@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl(700))); src: url(@await ResolveAssetUrlAsync(GetFontUrl("italic", 700)));
font-family: Whitney; font-family: gg sans;
font-weight: 700; font-weight: 700;
font-style: italic;
}
@@font-face {
src: url(@await ResolveAssetUrlAsync(GetFontUrl("italic", 800)));
font-family: gg sans;
font-weight: 800;
font-style: italic;
} }
html, body { html, body {
@ -75,7 +115,7 @@
padding: 0; padding: 0;
background-color: @Themed("#36393e", "#ffffff"); background-color: @Themed("#36393e", "#ffffff");
color: @Themed("#dcddde", "#23262a"); color: @Themed("#dcddde", "#23262a");
font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "gg sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 17px; font-size: 17px;
font-weight: @Themed("400", "500"); font-weight: @Themed("400", "500");
scroll-behavior: smooth; scroll-behavior: smooth;

Loading…
Cancel
Save