Update web font families def (#5749)

(cherry picked from commit db7b875c52)
This commit is contained in:
Eric Bailey
2024-10-14 10:11:36 -05:00
committed by Hailey
parent 65500294c5
commit e98ba06162
+3 -3
View File
@@ -4,7 +4,7 @@ import {useFonts} from 'expo-font'
import {isWeb} from '#/platform/detection'
import {Device, device} from '#/storage'
const FAMILIES = `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Liberation Sans", Helvetica, Arial, sans-serif`
const WEB_FONT_FAMILIES = `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"`
const factor = 0.0625 // 1 - (15/16)
const fontScaleMultipliers: Record<Device['fontScale'], number> = {
@@ -48,7 +48,7 @@ export function applyFonts(style: TextStyle, fontFamily: 'system' | 'theme') {
// fallback families only supported on web
if (isWeb) {
style.fontFamily += `, ${FAMILIES}`
style.fontFamily += `, ${WEB_FONT_FAMILIES}`
}
/**
@@ -59,7 +59,7 @@ export function applyFonts(style: TextStyle, fontFamily: 'system' | 'theme') {
} else {
// fallback families only supported on web
if (isWeb) {
style.fontFamily = style.fontFamily || FAMILIES
style.fontFamily = style.fontFamily || WEB_FONT_FAMILIES
}
/**