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

feat: add Arial as fallback for fonts #2048

Merged
merged 12 commits into from
Mar 1, 2024
24 changes: 24 additions & 0 deletions packages/blade/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,27 @@
U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20A0-20AF, U+20B0-20BF, U+20C0,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fallback Fonts */
@font-face {
font-family: 'Inter Fallback Arial';
src: local(Arial);
size-adjust: 105%;
ascent-override: 91%;
descent-override: 20%;
line-gap-override: 4%;
}

@font-face {
font-family: 'TASA Orbiter Fallback Arial';
src: local('Arial Bold');
size-adjust: 93%;
ascent-override: 95%;
descent-override: 20%;
line-gap-override: 10%;
}

:root {
--inter-fallback: 'Inter Fallback Arial';
--tasa-orbiter-fallback: 'TASA Orbiter Fallback Arial';
saurabhdaware marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { FontFamily } from './types';

// Fallbacks here are defined in `packages/blade/fonts.css`
export const fontFamily: FontFamily = {
text:
'"Inter", -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif',
heading:
'"TASA Orbiter", -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif',
text: '"Inter", var(--inter-fallback), Arial',
heading: '"TASA Orbiter", var(--tasa-orbiter-fallback), Arial',
code: '"Menlo", San Francisco Mono, Courier New, Roboto Mono, monospace',
};
Loading