Skip to content

Commit

Permalink
Fix macOS 12 fonts. Add macOS 13 fonts. (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar Kazlouski authored Nov 28, 2023
1 parent f2b92ea commit d08ed6a
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 163 deletions.
318 changes: 159 additions & 159 deletions docs/creep.js

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions src/fonts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ const MacOSFonts = {
],
// Monterey: https://support.apple.com/en-us/HT212587
'12': [
'Bai Jamjuree',
'Chakra Petch',
'Charmonman',
'Kodchasan',
'Noto Sans Gunjala Gondi Regular',
'Noto Sans Masaram Gondi Regular',
'Noto Serif Yezidi Regular'
],
// Ventura: https://support.apple.com/en-us/HT213266
'13': [
'Apple SD Gothic Neo ExtraBold',
'STIX Two Math Regular',
'STIX Two Text Regular',
'Noto Sans Canadian Aboriginal Regular',
],
}

Expand Down Expand Up @@ -289,6 +295,7 @@ export default async function getFonts() {

const getMacOS = ({ fonts, fontMap }) => {
const fontVersion = {
['13']: fontMap['13'].find((x) => fonts.includes(x)),
['12']: fontMap['12'].find((x) => fonts.includes(x)),
['10.15-11']: fontMap['10.15-11'].find((x) => fonts.includes(x)),
['10.13-10.14']: fontMap['10.13-10.14'].find((x) => fonts.includes(x)),
Expand All @@ -302,6 +309,7 @@ export default async function getFonts() {
'' + Object.keys(fontVersion).sort().filter((key) => !!fontVersion[key])
)
const hashMap = {
'10.10,10.11,10.12,10.13-10.14,10.15-11,10.9,12,13': 'Ventura',
'10.10,10.11,10.12,10.13-10.14,10.15-11,10.9,12': 'Monterey',
'10.10,10.11,10.12,10.13-10.14,10.15-11,10.9': '10.15-11',
'10.10,10.11,10.12,10.13-10.14,10.9': '10.13-10.14',
Expand Down

0 comments on commit d08ed6a

Please sign in to comment.