From 903695250b44374492adde12994b31c0b44df9cf Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 18 Sep 2024 12:22:06 -0500 Subject: [PATCH] Get rid of lower weight font usage --- src/alf/fonts.ts | 27 ++++++++++++++++++--------- src/lib/styles.ts | 4 ++-- src/lib/themes.ts | 12 ++++++------ 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/alf/fonts.ts b/src/alf/fonts.ts index f20de30b94..6ba862f8d9 100644 --- a/src/alf/fonts.ts +++ b/src/alf/fonts.ts @@ -31,14 +31,17 @@ export function setFontFamily(fontFamily: Device['fontFamily']) { device.set(['fontFamily'], fontFamily) } +/* + * Unused fonts are commented out, but the files are there if we need them. + */ export function useFonts() { return defaultUseFonts({ - 'Inter-Thin': require('../../assets/fonts/inter/Inter-Thin.otf'), - 'Inter-ThinItalic': require('../../assets/fonts/inter/Inter-ThinItalic.otf'), - 'Inter-ExtraLight': require('../../assets/fonts/inter/Inter-ExtraLight.otf'), - 'Inter-ExtraLightItalic': require('../../assets/fonts/inter/Inter-ExtraLightItalic.otf'), - 'Inter-Light': require('../../assets/fonts/inter/Inter-Light.otf'), - 'Inter-LightItalic': require('../../assets/fonts/inter/Inter-LightItalic.otf'), + // 'Inter-Thin': require('../../assets/fonts/inter/Inter-Thin.otf'), + // 'Inter-ThinItalic': require('../../assets/fonts/inter/Inter-ThinItalic.otf'), + // 'Inter-ExtraLight': require('../../assets/fonts/inter/Inter-ExtraLight.otf'), + // 'Inter-ExtraLightItalic': require('../../assets/fonts/inter/Inter-ExtraLightItalic.otf'), + // 'Inter-Light': require('../../assets/fonts/inter/Inter-Light.otf'), + // 'Inter-LightItalic': require('../../assets/fonts/inter/Inter-LightItalic.otf'), 'Inter-Regular': require('../../assets/fonts/inter/Inter-Regular.otf'), 'Inter-Italic': require('../../assets/fonts/inter/Inter-Italic.otf'), 'Inter-Medium': require('../../assets/fonts/inter/Inter-Medium.otf'), @@ -54,12 +57,18 @@ export function useFonts() { }) } +/* + * Unused fonts are commented out, but the files are there if we need them. + */ export function applyFonts(style: Record) { style.fontFamily = { - '100': 'Inter-Thin', - '200': 'Inter-ExtraLight', - '300': 'Inter-Light', + // '100': 'Inter-Thin', + // '200': 'Inter-ExtraLight', + // '300': 'Inter-Light', + '100': 'Inter-Regular', + '200': 'Inter-Regular', + '300': 'Inter-Regular', '400': 'Inter-Regular', '500': 'Inter-Medium', '600': 'Inter-SemiBold', diff --git a/src/lib/styles.ts b/src/lib/styles.ts index 91d967f8df..6a3d796110 100644 --- a/src/lib/styles.ts +++ b/src/lib/styles.ts @@ -84,8 +84,8 @@ export const s = StyleSheet.create({ semiBold: {fontWeight: '500'}, fw400: {fontWeight: '400'}, normal: {fontWeight: '400'}, - fw300: {fontWeight: '300'}, - light: {fontWeight: '300'}, + fw300: {fontWeight: '400'}, + light: {fontWeight: '400'}, fw200: {fontWeight: '200'}, // text decoration diff --git a/src/lib/themes.ts b/src/lib/themes.ts index 6b691a3fc1..d16f9f632a 100644 --- a/src/lib/themes.ts +++ b/src/lib/themes.ts @@ -90,7 +90,7 @@ export const defaultTheme: Theme = { '2xl-thin': { fontSize: 18, letterSpacing: tokens.TRACKING, - fontWeight: '300', + fontWeight: '400', }, '2xl': { fontSize: 18, @@ -115,7 +115,7 @@ export const defaultTheme: Theme = { 'xl-thin': { fontSize: 17, letterSpacing: tokens.TRACKING, - fontWeight: '300', + fontWeight: '400', }, xl: { fontSize: 17, @@ -140,7 +140,7 @@ export const defaultTheme: Theme = { 'lg-thin': { fontSize: 16, letterSpacing: tokens.TRACKING, - fontWeight: '300', + fontWeight: '400', }, lg: { fontSize: 16, @@ -165,7 +165,7 @@ export const defaultTheme: Theme = { 'md-thin': { fontSize: 15, letterSpacing: tokens.TRACKING, - fontWeight: '300', + fontWeight: '400', }, md: { fontSize: 15, @@ -190,7 +190,7 @@ export const defaultTheme: Theme = { 'sm-thin': { fontSize: 14, letterSpacing: tokens.TRACKING, - fontWeight: '300', + fontWeight: '400', }, sm: { fontSize: 14, @@ -215,7 +215,7 @@ export const defaultTheme: Theme = { 'xs-thin': { fontSize: 13, letterSpacing: tokens.TRACKING, - fontWeight: '300', + fontWeight: '400', }, xs: { fontSize: 13,