about summary refs log tree commit diff
path: root/src/view/com/util/text/Text.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2024-03-19 14:07:36 -0700
committerPaul Frazee <pfrazee@gmail.com>2024-03-19 14:07:36 -0700
commitf2fc654f348080ac6a9373130b953f91ab9f308b (patch)
tree91c93ac11b825bfcf9aa561a25ba717b12005ba6 /src/view/com/util/text/Text.tsx
parentccf53af2ba1120e423679f5c0803349de4331443 (diff)
parente433a1c968af548327c15bcc2e7fcb5a80760d36 (diff)
downloadvoidsky-f2fc654f348080ac6a9373130b953f91ab9f308b.tar.zst
Merge branch 'alexkuz-web-fix-fonts-and-image-box' into main
Diffstat (limited to 'src/view/com/util/text/Text.tsx')
-rw-r--r--src/view/com/util/text/Text.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/view/com/util/text/Text.tsx b/src/view/com/util/text/Text.tsx
index ccb51bfca..37d665581 100644
--- a/src/view/com/util/text/Text.tsx
+++ b/src/view/com/util/text/Text.tsx
@@ -2,7 +2,7 @@ import React from 'react'
 import {Text as RNText, TextProps} from 'react-native'
 import {s, lh} from 'lib/styles'
 import {useTheme, TypographyVariant} from 'lib/ThemeContext'
-import {isIOS} from 'platform/detection'
+import {isIOS, isWeb} from 'platform/detection'
 import {UITextView} from 'react-native-ui-text-view'
 
 export type CustomTextProps = TextProps & {
@@ -13,6 +13,11 @@ export type CustomTextProps = TextProps & {
   selectable?: boolean
 }
 
+const fontFamilyStyle = {
+  fontFamily:
+    '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Liberation Sans", Helvetica, Arial, sans-serif',
+}
+
 export function Text({
   type = 'md',
   children,
@@ -39,7 +44,13 @@ export function Text({
 
   return (
     <RNText
-      style={[s.black, typography, lineHeightStyle, style]}
+      style={[
+        s.black,
+        typography,
+        isWeb && fontFamilyStyle,
+        lineHeightStyle,
+        style,
+      ]}
       // @ts-ignore web only -esb
       dataSet={Object.assign({tooltip: title}, dataSet || {})}
       selectable={selectable}