Get rid of lower weight font usage

This commit is contained in:
Eric Bailey
2024-09-18 12:22:06 -05:00
parent d7063c43d0
commit 903695250b
3 changed files with 26 additions and 17 deletions
+18 -9
View File
@@ -31,14 +31,17 @@ export function setFontFamily(fontFamily: Device['fontFamily']) {
device.set(['fontFamily'], fontFamily) device.set(['fontFamily'], fontFamily)
} }
/*
* Unused fonts are commented out, but the files are there if we need them.
*/
export function useFonts() { export function useFonts() {
return defaultUseFonts({ return defaultUseFonts({
'Inter-Thin': require('../../assets/fonts/inter/Inter-Thin.otf'), // 'Inter-Thin': require('../../assets/fonts/inter/Inter-Thin.otf'),
'Inter-ThinItalic': require('../../assets/fonts/inter/Inter-ThinItalic.otf'), // 'Inter-ThinItalic': require('../../assets/fonts/inter/Inter-ThinItalic.otf'),
'Inter-ExtraLight': require('../../assets/fonts/inter/Inter-ExtraLight.otf'), // 'Inter-ExtraLight': require('../../assets/fonts/inter/Inter-ExtraLight.otf'),
'Inter-ExtraLightItalic': require('../../assets/fonts/inter/Inter-ExtraLightItalic.otf'), // 'Inter-ExtraLightItalic': require('../../assets/fonts/inter/Inter-ExtraLightItalic.otf'),
'Inter-Light': require('../../assets/fonts/inter/Inter-Light.otf'), // 'Inter-Light': require('../../assets/fonts/inter/Inter-Light.otf'),
'Inter-LightItalic': require('../../assets/fonts/inter/Inter-LightItalic.otf'), // 'Inter-LightItalic': require('../../assets/fonts/inter/Inter-LightItalic.otf'),
'Inter-Regular': require('../../assets/fonts/inter/Inter-Regular.otf'), 'Inter-Regular': require('../../assets/fonts/inter/Inter-Regular.otf'),
'Inter-Italic': require('../../assets/fonts/inter/Inter-Italic.otf'), 'Inter-Italic': require('../../assets/fonts/inter/Inter-Italic.otf'),
'Inter-Medium': require('../../assets/fonts/inter/Inter-Medium.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<string, any>) { export function applyFonts(style: Record<string, any>) {
style.fontFamily = style.fontFamily =
{ {
'100': 'Inter-Thin', // '100': 'Inter-Thin',
'200': 'Inter-ExtraLight', // '200': 'Inter-ExtraLight',
'300': 'Inter-Light', // '300': 'Inter-Light',
'100': 'Inter-Regular',
'200': 'Inter-Regular',
'300': 'Inter-Regular',
'400': 'Inter-Regular', '400': 'Inter-Regular',
'500': 'Inter-Medium', '500': 'Inter-Medium',
'600': 'Inter-SemiBold', '600': 'Inter-SemiBold',
+2 -2
View File
@@ -84,8 +84,8 @@ export const s = StyleSheet.create({
semiBold: {fontWeight: '500'}, semiBold: {fontWeight: '500'},
fw400: {fontWeight: '400'}, fw400: {fontWeight: '400'},
normal: {fontWeight: '400'}, normal: {fontWeight: '400'},
fw300: {fontWeight: '300'}, fw300: {fontWeight: '400'},
light: {fontWeight: '300'}, light: {fontWeight: '400'},
fw200: {fontWeight: '200'}, fw200: {fontWeight: '200'},
// text decoration // text decoration
+6 -6
View File
@@ -90,7 +90,7 @@ export const defaultTheme: Theme = {
'2xl-thin': { '2xl-thin': {
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '300', fontWeight: '400',
}, },
'2xl': { '2xl': {
fontSize: 18, fontSize: 18,
@@ -115,7 +115,7 @@ export const defaultTheme: Theme = {
'xl-thin': { 'xl-thin': {
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '300', fontWeight: '400',
}, },
xl: { xl: {
fontSize: 17, fontSize: 17,
@@ -140,7 +140,7 @@ export const defaultTheme: Theme = {
'lg-thin': { 'lg-thin': {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '300', fontWeight: '400',
}, },
lg: { lg: {
fontSize: 16, fontSize: 16,
@@ -165,7 +165,7 @@ export const defaultTheme: Theme = {
'md-thin': { 'md-thin': {
fontSize: 15, fontSize: 15,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '300', fontWeight: '400',
}, },
md: { md: {
fontSize: 15, fontSize: 15,
@@ -190,7 +190,7 @@ export const defaultTheme: Theme = {
'sm-thin': { 'sm-thin': {
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '300', fontWeight: '400',
}, },
sm: { sm: {
fontSize: 14, fontSize: 14,
@@ -215,7 +215,7 @@ export const defaultTheme: Theme = {
'xs-thin': { 'xs-thin': {
fontSize: 13, fontSize: 13,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '300', fontWeight: '400',
}, },
xs: { xs: {
fontSize: 13, fontSize: 13,