Skip to content

Commit 93d39fd

Browse files
authored
chore: Update Spectrum fonts for Arabic and Hebrew (#9187)
* chore: Update Spectrum fonts for Arabic and Hebrew * lint
1 parent 382b935 commit 93d39fd

File tree

3 files changed

+53
-35
lines changed

3 files changed

+53
-35
lines changed

packages/@react-spectrum/s2/src/font-faces.css

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
font-stretch: normal;
1717
}
1818

19-
/* There are currently no italics in Spectrum. Uncomment these if needed. */
20-
/*
19+
/* Italics are not used by Spectrum components, but may be used in user-generated content. */
2120
@font-face {
2221
font-family: "adobe-clean-spectrum-vf";
2322
src: url("https://use.typekit.net/af/8a3244/0000000000000000775c55a2/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i1&v=3") format("woff2"), url("https://use.typekit.net/af/8a3244/0000000000000000775c55a2/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i1&v=3") format("woff"), url("https://use.typekit.net/af/8a3244/0000000000000000775c55a2/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i1&v=3") format("opentype");
@@ -35,68 +34,94 @@
3534
font-weight: 100 1000;
3635
font-stretch: normal;
3736
}
38-
*/
3937

4038
@font-face {
41-
font-family: "myriad-arabic";
42-
src: url("https://use.typekit.net/af/dfb464/00000000000000007735a2f9/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/dfb464/00000000000000007735a2f9/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/dfb464/00000000000000007735a2f9/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("opentype");
39+
font-family: "adobe-clean-arabic";
40+
src: url("https://use.typekit.net/af/ce4383/0000000000000000775e72dc/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff2"), url("https://use.typekit.net/af/ce4383/0000000000000000775e72dc/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff"), url("https://use.typekit.net/af/ce4383/0000000000000000775e72dc/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("opentype");
4341
font-display: auto;
4442
font-style: normal;
45-
font-weight: 700;
43+
font-weight: 400;
4644
font-stretch: normal;
4745
}
4846

4947
@font-face {
50-
font-family: "myriad-arabic";
51-
src: url("https://use.typekit.net/af/560a53/00000000000000007735a300/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff2"), url("https://use.typekit.net/af/560a53/00000000000000007735a300/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff"), url("https://use.typekit.net/af/560a53/00000000000000007735a300/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("opentype");
48+
font-family: "adobe-clean-arabic";
49+
src: url("https://use.typekit.net/af/502696/0000000000000000775e72d7/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3") format("woff2"), url("https://use.typekit.net/af/502696/0000000000000000775e72d7/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3") format("woff"), url("https://use.typekit.net/af/502696/0000000000000000775e72d7/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3") format("opentype");
5250
font-display: auto;
5351
font-style: normal;
54-
font-weight: 400;
52+
font-weight: 500;
5553
font-stretch: normal;
5654
}
5755

5856
@font-face {
59-
font-family: "myriad-arabic";
60-
src: url("https://use.typekit.net/af/0f9162/00000000000000007735a307/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n6&v=3") format("woff2"), url("https://use.typekit.net/af/0f9162/00000000000000007735a307/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n6&v=3") format("woff"), url("https://use.typekit.net/af/0f9162/00000000000000007735a307/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n6&v=3") format("opentype");
57+
font-family: "adobe-clean-arabic";
58+
src: url("https://use.typekit.net/af/756050/0000000000000000775e72db/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/756050/0000000000000000775e72db/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/756050/0000000000000000775e72db/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("opentype");
6159
font-display: auto;
6260
font-style: normal;
63-
font-weight: 600;
61+
font-weight: 700;
6462
font-stretch: normal;
6563
}
6664

6765
@font-face {
68-
font-family: "myriad-arabic";
69-
src: url("https://use.typekit.net/af/ab2792/00000000000000007735a309/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("woff2"), url("https://use.typekit.net/af/ab2792/00000000000000007735a309/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("woff"), url("https://use.typekit.net/af/ab2792/00000000000000007735a309/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("opentype");
66+
font-family: "adobe-clean-arabic";
67+
src: url("https://use.typekit.net/af/6adae5/0000000000000000775e72d9/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n8&v=3") format("woff2"), url("https://use.typekit.net/af/6adae5/0000000000000000775e72d9/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n8&v=3") format("woff"), url("https://use.typekit.net/af/6adae5/0000000000000000775e72d9/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n8&v=3") format("opentype");
68+
font-display: auto;
69+
font-style: normal;
70+
font-weight: 800;
71+
font-stretch: normal;
72+
}
73+
74+
@font-face {
75+
font-family: "adobe-clean-arabic";
76+
src: url("https://use.typekit.net/af/cccd38/0000000000000000775e72dd/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("woff2"), url("https://use.typekit.net/af/cccd38/0000000000000000775e72dd/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("woff"), url("https://use.typekit.net/af/cccd38/0000000000000000775e72dd/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("opentype");
7077
font-display: auto;
7178
font-style: normal;
7279
font-weight: 900;
7380
font-stretch: normal;
7481
}
7582

7683
@font-face {
77-
font-family: "myriad-hebrew";
78-
src: url("https://use.typekit.net/af/ffca46/00000000000000007735a30a/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/ffca46/00000000000000007735a30a/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/ffca46/00000000000000007735a30a/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("opentype");
84+
font-family: "adobe-clean-hebrew";
85+
src: url("https://use.typekit.net/af/6c5b6b/0000000000000000775e7343/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff2"), url("https://use.typekit.net/af/6c5b6b/0000000000000000775e7343/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff"), url("https://use.typekit.net/af/6c5b6b/0000000000000000775e7343/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("opentype");
86+
font-display: auto;
87+
font-style: normal;
88+
font-weight: 400;
89+
font-stretch: normal;
90+
}
91+
92+
@font-face {
93+
font-family: "adobe-clean-hebrew";
94+
src: url("https://use.typekit.net/af/6d4553/0000000000000000775e7345/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3") format("woff2"), url("https://use.typekit.net/af/6d4553/0000000000000000775e7345/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3") format("woff"), url("https://use.typekit.net/af/6d4553/0000000000000000775e7345/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3") format("opentype");
95+
font-display: auto;
96+
font-style: normal;
97+
font-weight: 500;
98+
font-stretch: normal;
99+
}
100+
101+
@font-face {
102+
font-family: "adobe-clean-hebrew";
103+
src: url("https://use.typekit.net/af/f7ca66/0000000000000000775e7341/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/f7ca66/0000000000000000775e7341/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/f7ca66/0000000000000000775e7341/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n7&v=3") format("opentype");
79104
font-display: auto;
80105
font-style: normal;
81106
font-weight: 700;
82107
font-stretch: normal;
83108
}
84109

85110
@font-face {
86-
font-family: "myriad-hebrew";
87-
src: url("https://use.typekit.net/af/e90860/00000000000000007735a313/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff2"), url("https://use.typekit.net/af/e90860/00000000000000007735a313/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("woff"), url("https://use.typekit.net/af/e90860/00000000000000007735a313/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3") format("opentype");
111+
font-family: "adobe-clean-hebrew";
112+
src: url("https://use.typekit.net/af/329f4d/0000000000000000775e7342/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n8&v=3") format("woff2"), url("https://use.typekit.net/af/329f4d/0000000000000000775e7342/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n8&v=3") format("woff"), url("https://use.typekit.net/af/329f4d/0000000000000000775e7342/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n8&v=3") format("opentype");
88113
font-display: auto;
89114
font-style: normal;
90-
font-weight: 400;
115+
font-weight: 800;
91116
font-stretch: normal;
92117
}
93118

94119
@font-face {
95-
font-family: "myriad-hebrew";
96-
src: url("https://use.typekit.net/af/619974/00000000000000007735a31f/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n6&v=3") format("woff2"), url("https://use.typekit.net/af/619974/00000000000000007735a31f/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n6&v=3") format("woff"), url("https://use.typekit.net/af/619974/00000000000000007735a31f/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n6&v=3") format("opentype");
120+
font-family: "adobe-clean-hebrew";
121+
src: url("https://use.typekit.net/af/34b661/0000000000000000775e733f/31/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("woff2"), url("https://use.typekit.net/af/34b661/0000000000000000775e733f/31/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("woff"), url("https://use.typekit.net/af/34b661/0000000000000000775e733f/31/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n9&v=3") format("opentype");
97122
font-display: auto;
98123
font-style: normal;
99-
font-weight: 600;
124+
font-weight: 900;
100125
font-stretch: normal;
101126
}
102127

packages/@react-spectrum/s2/stories/ActionButton.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ export const Fonts: Story = {
127127
<ActionButton {...args}><NewIcon /><Text>{messages['en-US'].cut}</Text></ActionButton>
128128
<ActionButton {...args}><NewIcon /><Text>{messages['en-US'].paste}</Text></ActionButton>
129129
</Provider>
130-
Arabic (myriad-arabic)
130+
Arabic (adobe-clean-arabic)
131131
<Provider locale="ar-AR" styles={style({display: 'contents'})}>
132132
<ActionButton {...args}><NewIcon /><Text>{messages['ar-AR'].button}</Text></ActionButton>
133133
<ActionButton {...args}><NewIcon /><Text>{messages['ar-AR'].copy}</Text></ActionButton>
134134
<ActionButton {...args}><NewIcon /><Text>{messages['ar-AR'].cut}</Text></ActionButton>
135135
<ActionButton {...args}><NewIcon /><Text>{messages['ar-AR'].paste}</Text></ActionButton>
136136
</Provider>
137-
Hebrew (myriad-hebrew)
137+
Hebrew (adobe-clean-hebrew)
138138
<Provider locale="he-IL" styles={style({display: 'contents'})}>
139139
<ActionButton {...args}><NewIcon /><Text>{messages['he-IL'].button}</Text></ActionButton>
140140
<ActionButton {...args}><NewIcon /><Text>{messages['he-IL'].copy}</Text></ActionButton>

packages/@react-spectrum/s2/style/spectrum-theme.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -434,17 +434,15 @@ let durationValue = (value: number | string) => typeof value === 'number' ? valu
434434
const fontWeightBase = {
435435
normal: '400',
436436
medium: {
437-
default: '500',
438-
':lang(ar, he)': '600' // Myriad does not have a 500 weight
437+
default: '500'
439438
},
440439
bold: {
441440
default: '700',
442441
':lang(ja, ko, zh)': '500' // Adobe Clean Han uses 500 as the bold weight
443442
},
444443
'extra-bold': {
445444
default: '800',
446-
':lang(ja, ko, zh)': '700', // Adobe Clean Han uses 700 as the extra bold weight.
447-
':lang(ar, he)': '700' // Myriad does not have a 800 weight
445+
':lang(ja, ko, zh)': '700' // Adobe Clean Han uses 700 as the extra bold weight.
448446
},
449447
black: '900'
450448
} as const;
@@ -466,8 +464,8 @@ const fontWeight = {
466464
} as const;
467465

468466
const i18nFonts = {
469-
':lang(ar)': 'myriad-arabic, ui-sans-serif, system-ui, sans-serif',
470-
':lang(he)': 'myriad-hebrew, ui-sans-serif, system-ui, sans-serif',
467+
':lang(ar)': 'adobe-clean-arabic, myriad-arabic, ui-sans-serif, system-ui, sans-serif',
468+
':lang(he)': 'adobe-clean-hebrew, myriad-hebrew, ui-sans-serif, system-ui, sans-serif',
471469
':lang(ja)': "adobe-clean-han-japanese, 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Osaka, YuGothic, 'Yu Gothic', 'メイリオ', Meiryo, 'MS Pゴシック', 'MS PGothic', sans-serif",
472470
':lang(ko)': "adobe-clean-han-korean, source-han-korean, 'Malgun Gothic', 'Apple Gothic', sans-serif",
473471
':lang(zh)': "adobe-clean-han-traditional, source-han-traditional, 'MingLiu', 'Heiti TC Light', sans-serif",
@@ -780,19 +778,15 @@ export const style = createTheme({
780778
ui: {
781779
// Calculate line-height based on font size.
782780
default: lineHeightCalc,
783-
// Arabic and hebrew use the old line-height for now since they are on Myriad instead of Adobe Clean.
784-
':lang(ar, he)': getToken('line-height-100'),
785781
// CJK fonts use a larger line-height.
786782
':lang(ja, ko, zh, zh-Hant, zh-Hans, zh-CN, zh-SG)': getToken('line-height-200')
787783
},
788784
heading: {
789785
default: lineHeightCalc,
790-
':lang(ar, he)': getToken('line-height-100'),
791786
':lang(ja, ko, zh, zh-Hant, zh-Hans, zh-CN, zh-SG)': getToken('heading-cjk-line-height')
792787
},
793788
title: {
794789
default: lineHeightCalc,
795-
':lang(ar, he)': getToken('line-height-100'),
796790
':lang(ja, ko, zh, zh-Hant, zh-Hans, zh-CN, zh-SG)': getToken('title-cjk-line-height')
797791
},
798792
body: {
@@ -802,7 +796,6 @@ export const style = createTheme({
802796
},
803797
detail: {
804798
default: lineHeightCalc,
805-
':lang(ar, he)': getToken('line-height-100'),
806799
':lang(ja, ko, zh, zh-Hant, zh-Hans, zh-CN, zh-SG)': getToken('detail-cjk-line-height')
807800
},
808801
code: {

0 commit comments

Comments
 (0)