Increase fontWeight on android

This commit is contained in:
Eric Bailey
2024-10-03 15:31:49 -05:00
parent eb3b01d0ad
commit 235c8c5999
3 changed files with 48 additions and 50 deletions
+3 -3
View File
@@ -276,13 +276,13 @@ export const atoms = {
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
}, },
font_normal: { font_normal: {
fontWeight: tokens.fontWeight.regular, fontWeight: tokens.fontWeight.normal,
}, },
font_bold: { font_bold: {
fontWeight: tokens.fontWeight.semibold, fontWeight: tokens.fontWeight.bold,
}, },
font_heavy: { font_heavy: {
fontWeight: tokens.fontWeight.extrabold, fontWeight: tokens.fontWeight.heavy,
}, },
italic: { italic: {
fontStyle: 'italic', fontStyle: 'italic',
+5 -8
View File
@@ -1,6 +1,6 @@
import {Platform} from 'react-native' import {isAndroid} from '#/platform/detection'
export const TRACKING = Platform.OS === 'android' ? 0.1 : 0 export const TRACKING = isAndroid ? 0.1 : 0
export const color = { export const color = {
temp_purple: 'rgb(105 0 255)', temp_purple: 'rgb(105 0 255)',
@@ -51,12 +51,9 @@ export const borderRadius = {
* These correspond to Inter font files we actually load. * These correspond to Inter font files we actually load.
*/ */
export const fontWeight = { export const fontWeight = {
regular: '400', normal: '400',
// medium: '500', bold: isAndroid ? '700' : '600',
semibold: '600', heavy: isAndroid ? '900' : '800',
// bold: '700',
extrabold: '800',
// black: '900',
} as const } as const
export const gradients = { export const gradients = {
+40 -39
View File
@@ -2,6 +2,7 @@ import {Platform} from 'react-native'
import {tokens} from '#/alf' import {tokens} from '#/alf'
import {darkPalette, dimPalette, lightPalette} from '#/alf/themes' import {darkPalette, dimPalette, lightPalette} from '#/alf/themes'
import {fontWeight} from '#/alf/tokens'
import {colors} from './styles' import {colors} from './styles'
import type {Theme} from './ThemeContext' import type {Theme} from './ThemeContext'
@@ -90,195 +91,195 @@ export const defaultTheme: Theme = {
'2xl-thin': { '2xl-thin': {
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'2xl': { '2xl': {
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'2xl-medium': { '2xl-medium': {
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'2xl-bold': { '2xl-bold': {
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'2xl-heavy': { '2xl-heavy': {
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '800', fontWeight: fontWeight.heavy,
}, },
'xl-thin': { 'xl-thin': {
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
xl: { xl: {
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'xl-medium': { 'xl-medium': {
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'xl-bold': { 'xl-bold': {
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'xl-heavy': { 'xl-heavy': {
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '800', fontWeight: fontWeight.heavy,
}, },
'lg-thin': { 'lg-thin': {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
lg: { lg: {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'lg-medium': { 'lg-medium': {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'lg-bold': { 'lg-bold': {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'lg-heavy': { 'lg-heavy': {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '800', fontWeight: fontWeight.heavy,
}, },
'md-thin': { 'md-thin': {
fontSize: 15, fontSize: 15,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
md: { md: {
fontSize: 15, fontSize: 15,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'md-medium': { 'md-medium': {
fontSize: 15, fontSize: 15,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'md-bold': { 'md-bold': {
fontSize: 15, fontSize: 15,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'md-heavy': { 'md-heavy': {
fontSize: 15, fontSize: 15,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '800', fontWeight: fontWeight.heavy,
}, },
'sm-thin': { 'sm-thin': {
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
sm: { sm: {
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'sm-medium': { 'sm-medium': {
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'sm-bold': { 'sm-bold': {
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'sm-heavy': { 'sm-heavy': {
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '800', fontWeight: fontWeight.heavy,
}, },
'xs-thin': { 'xs-thin': {
fontSize: 13, fontSize: 13,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
xs: { xs: {
fontSize: 13, fontSize: 13,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'xs-medium': { 'xs-medium': {
fontSize: 13, fontSize: 13,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'xs-bold': { 'xs-bold': {
fontSize: 13, fontSize: 13,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'xs-heavy': { 'xs-heavy': {
fontSize: 13, fontSize: 13,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '800', fontWeight: fontWeight.heavy,
}, },
'title-2xl': { 'title-2xl': {
fontSize: 34, fontSize: 34,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'title-xl': { 'title-xl': {
fontSize: 28, fontSize: 28,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
'title-lg': { 'title-lg': {
fontSize: 22, fontSize: 22,
fontWeight: '600', fontWeight: fontWeight.bold,
}, },
title: { title: {
fontWeight: '600', fontWeight: fontWeight.bold,
fontSize: 20, fontSize: 20,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
}, },
'title-sm': { 'title-sm': {
fontWeight: '600', fontWeight: fontWeight.bold,
fontSize: 17, fontSize: 17,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
}, },
'post-text': { 'post-text': {
fontSize: 16, fontSize: 16,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'post-text-lg': { 'post-text-lg': {
fontSize: 20, fontSize: 20,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
fontWeight: '400', fontWeight: fontWeight.normal,
}, },
'button-lg': { 'button-lg': {
fontWeight: '600', fontWeight: fontWeight.bold,
fontSize: 18, fontSize: 18,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
}, },
button: { button: {
fontWeight: '600', fontWeight: fontWeight.bold,
fontSize: 14, fontSize: 14,
letterSpacing: tokens.TRACKING, letterSpacing: tokens.TRACKING,
}, },