Skip to content

Commit b276845

Browse files
committed
Change Ubuntu font name to 'sans-serif'
This allows us to skip explicitly setting the font name for our default font
1 parent e088806 commit b276845

File tree

20 files changed

+22
-41
lines changed

20 files changed

+22
-41
lines changed

.changeset/odd-beers-wear.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@plexinc/react-native-lightning-example": patch
3+
"@plexinc/react-lightning-components": patch
4+
"@plexinc/react-native-lightning": patch
5+
"@plexinc/react-lightning-example": patch
6+
"@plexinc/react-lightning-storybook": patch
7+
---
8+
9+
Changed font name from Ubuntu to `sans-serif`

apps/react-lightning-example/src/components/AnimatedImage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ const AnimatedImage = () => {
4141
style={{ width: 200, height: 300, borderRadius: 8 }}
4242
/>
4343

44-
<lng-text style={{ fontFamily: 'Ubuntu', y: 300 }}>
45-
Hello Darkness My Old Frnd
46-
</lng-text>
44+
<lng-text style={{ y: 300 }}>Hello Darkness My Old Frnd</lng-text>
4745
</lng-view>
4846
);
4947
};

apps/react-lightning-example/src/components/Button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const containerStyles = {
1717
};
1818

1919
const textStyle = {
20-
fontFamily: 'Ubuntu',
2120
fontSize: 32,
2221
lineHeight: containerStyles.height,
2322
textAlign: 'center' as const,

apps/react-lightning-example/src/components/HubItem.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export const HubItem = ({ metadata, style }: Props) => {
2929

3030
<lng-text
3131
style={{
32-
fontFamily: 'Ubuntu',
3332
fontSize: 25,
3433
lineHeight: 30,
3534
maxWidth: 250,

apps/react-lightning-example/src/components/HubRow.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ export const HubRow = (props: Props) => {
1515
if (isLoading) {
1616
return (
1717
<lng-view style={style}>
18-
<lng-text style={{ fontFamily: 'Ubuntu' }}>Loading...</lng-text>
18+
<lng-text>Loading...</lng-text>
1919
</lng-view>
2020
);
2121
}
2222

2323
if (!data || error) {
2424
return (
2525
<lng-view style={style}>
26-
<lng-text style={{ fontFamily: 'Ubuntu' }}>
27-
There was an error loading the hub
28-
</lng-text>
26+
<lng-text>There was an error loading the hub</lng-text>
2927
</lng-view>
3028
);
3129
}
@@ -34,7 +32,6 @@ export const HubRow = (props: Props) => {
3432
<Column {...rest} style={style} focusable>
3533
<lng-text
3634
style={{
37-
fontFamily: 'Ubuntu',
3835
fontSize: 40,
3936
lineHeight: 50,
4037
marginBottom: 20,

apps/react-lightning-example/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ const router = createBrowserRouter([
6161
const options: RenderOptions = {
6262
fonts: (stage) => [
6363
new SdfTrFontFace('msdf', {
64-
fontFamily: 'Ubuntu',
64+
fontFamily: 'sans-serif',
6565
descriptors: {},
6666
atlasUrl: '/fonts/Ubuntu-Regular.msdf.png',
6767
atlasDataUrl: '/fonts/Ubuntu-Regular.msdf.json',
6868
stage,
6969
}),
7070
new SdfTrFontFace('msdf', {
71-
fontFamily: 'Ubuntu',
71+
fontFamily: 'sans-serif',
7272
descriptors: {
7373
weight: 'bold',
7474
},

apps/react-lightning-example/src/pages/AnimationPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export const AnimationPage = () => {
1616
return (
1717
<>
1818
<Column focusable style={{ gap: 20, zIndex: 10 }}>
19-
<lng-text
20-
style={{ fontFamily: 'Ubuntu', color: 0xffffffff, fontSize: 50 }}
21-
>
19+
<lng-text style={{ color: 0xffffffff, fontSize: 50 }}>
2220
Poster Count: {numPosters}
2321
</lng-text>
2422
<Column focusable style={{ width: 200, gap: 10 }}>

apps/react-lightning-example/src/pages/BrowsePage.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@ export const BrowsePage = () => {
1515
}, []);
1616

1717
if (isLoading) {
18-
return <lng-text style={{ fontFamily: 'Ubuntu' }}>Loading...</lng-text>;
18+
return <lng-text>Loading...</lng-text>;
1919
}
2020

2121
if (!data || error) {
22-
return (
23-
<lng-text style={{ fontFamily: 'Ubuntu' }}>
24-
There was an error loading the data
25-
</lng-text>
26-
);
22+
return <lng-text>There was an error loading the data</lng-text>;
2723
}
2824

2925
return (

apps/react-lightning-example/src/pages/Page60.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export const Question = ({ text, w }: { text: string; w?: number }) => {
1919
>
2020
<lng-text
2121
style={{
22-
fontFamily: 'Ubuntu',
2322
fontSize: 48,
2423
maxLines: 3,
2524
textAlign: 'center' as const,

apps/react-lightning-example/src/pages/PosterPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export const PosterPage = () => {
2222
<Button>Beep</Button>
2323
<lng-text
2424
style={{
25-
fontFamily: 'Ubuntu',
2625
fontSize: 40,
2726
lineHeight: 50,
2827
marginLeft: 20,

0 commit comments

Comments
 (0)