Skip to content

Commit

Permalink
undo last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorin-Oakenpants authored Sep 19, 2023
1 parent 6af7732 commit f480562
Showing 1 changed file with 11 additions and 63 deletions.
74 changes: 11 additions & 63 deletions js/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,15 @@ let fntCodes = [],
fntDocEnabled = false

let fntMaster = {
// TB13 bundled: reuse for android/linux
/* changes fom TB12
all: name changes
Noto Sans Symbols2 -> Noto Sans Symbols 2
Noto Serif Hmong Nyiakeng -> Noto Serif NP Hmong
all: new
noto sans: Armenian, Bengali UI, Devanagari UI, Gujarati UI, Gurmukhi UI, Hebrew,
Kannada UI, Malayalam UI, Sinhala UI, Tamil UI, Telugu UI, Thai
noto serif: Armenian, Hebrew, Thai
mac/linux: replace
STIX Math -> STIX Two Math
*/

// TB bundled: reuse for android/linux
'bundled': {
// all: win/mac/linux: 109 sans, 24 serif
'allnotosans': [
'Adlam','Armenian','Balinese','Bamum','Bassa Vah','Batak','Bengali','Bengali UI','Buginese','Buhid','Canadian Aboriginal',
'Chakma','Cham','Cherokee','Coptic','Deseret','Devanagari','Devanagari UI','Elbasan','Ethiopic','Georgian','Grantha',
'Gujarati','Gujarati UI','Gunjala Gondi','Gurmukhi','Gurmukhi UI','Hanifi Rohingya','Hanunoo','Hebrew','Javanese','Kannada',
'Kannada UI','Kayah Li','Khmer','Khojki','Khudawadi','Lao','Lepcha','Limbu','Lisu','Mahajani','Malayalam','Malayalam UI',
'Mandaic','Masaram Gondi','Medefaidrin','Meetei Mayek','Mende Kikakui','Miao','Modi','Mongolian','Mro','Multani','Myanmar',
'NKo','New Tai Lue','Newa','Ol Chiki','Oriya','Osage','Osmanya','Pahawh Hmong','Pau Cin Hau','Rejang','Runic','Samaritan',
'Saurashtra','Sharada','Shavian','Sinhala','Sinhala UI','Sora Sompeng','Soyombo','Sundanese','Syloti Nagri','Symbols',
'Symbols 2','Syriac','Tagalog','Tagbanwa','Tai Le','Tai Tham','Tai Viet','Takri','Tamil','Tamil UI','Telugu','Telugu UI',
'Thaana','Thai','Tifinagh','Tifinagh APT','Tifinagh Adrar','Tifinagh Agraw Imazighen','Tifinagh Ahaggar','Tifinagh Air',
'Tifinagh Azawagh','Tifinagh Ghat','Tifinagh Hawad','Tifinagh Rhissa Ixa','Tifinagh SIL','Tifinagh Tawellemmet','Tirhuta',
'Vai','Wancho','Warang Citi','Yi','Zanabazar Square',
],
'allnotoserif': [
'Armenian','Balinese','Bengali','Devanagari','Dogra','Ethiopic','Georgian','Grantha','Gujarati','Gurmukhi','Hebrew','Kannada',
'Khmer','Khojki','Lao','Malayalam','Myanmar','NP Hmong','Sinhala','Tamil','Telugu','Thai','Tibetan','Yezidi',
],
// all: win/mac/linux: 97 sans, 21 serif
'allnotosans': ['Adlam','Balinese','Bamum','Bassa Vah','Batak','Bengali','Buginese','Buhid','Canadian Aboriginal','Chakma','Cham','Cherokee','Coptic','Deseret','Devanagari','Elbasan','Ethiopic','Georgian','Grantha','Gujarati','Gunjala Gondi','Gurmukhi','Hanifi Rohingya','Hanunoo','Javanese','Kannada','Kayah Li','Khmer','Khojki','Khudawadi','Lao','Lepcha','Limbu','Lisu','Mahajani','Malayalam','Mandaic','Masaram Gondi','Medefaidrin','Meetei Mayek','Mende Kikakui','Miao','Modi','Mongolian','Mro','Multani','Myanmar','NKo','New Tai Lue','Newa','Ol Chiki','Oriya','Osage','Osmanya','Pahawh Hmong','Pau Cin Hau','Rejang','Runic','Samaritan','Saurashtra','Sharada','Shavian','Sinhala','Sora Sompeng','Soyombo','Sundanese','Syloti Nagri','Symbols','Symbols2','Syriac','Tagalog','Tagbanwa','Tai Le','Tai Tham','Tai Viet','Takri','Tamil','Telugu','Thaana','Tifinagh','Tifinagh APT','Tifinagh Adrar','Tifinagh Agraw Imazighen','Tifinagh Ahaggar','Tifinagh Air','Tifinagh Azawagh','Tifinagh Ghat','Tifinagh Hawad','Tifinagh Rhissa Ixa','Tifinagh SIL','Tifinagh Tawellemmet','Tirhuta','Vai','Wancho','Warang Citi','Yi','Zanabazar Square',],
'allnotoserif': ['Balinese','Bengali','Devanagari','Dogra','Ethiopic','Georgian','Grantha','Gujarati','Gurmukhi','Hmong Nyiakeng','Kannada','Khmer','Khojki','Lao','Malayalam','Myanmar','Sinhala','Tamil','Telugu','Tibetan','Yezidi',],
'android': [],
// then linux +10?, mac +1?, win +4
'linux': ['Arimo','Cousine','Noto Naskh Arabic','Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC','STIX Two Math','Tinos','Twemoji Mozilla',],
'mac': ['STIX Two Math',],
// then linux +16, mac +5, win +4
'linux': ['Arimo','Cousine','Noto Naskh Arabic','Noto Sans Armenian','Noto Sans Hebrew','Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC','Noto Sans Thai','Noto Serif Armenian','Noto Serif Hebrew','Noto Serif Thai','STIX Math','Tinos','Twemoji Mozilla',],
'mac': ['Noto Sans Armenian','Noto Sans Hebrew','Noto Serif Armenian','Noto Serif Hebrew','STIX Math',],
'windows': ['Noto Naskh Arabic','Noto Sans','Noto Serif','Twemoji Mozilla',],
},
// TB whitelist system
Expand Down Expand Up @@ -164,21 +137,11 @@ let fntMaster = {
},
'system': {
'android': [
// we start with bundled[all*] 133
// + old noto font names
'Noto Sans Symbols2','Noto Serif Hmong Nyiakeng',
// we start with bundled[all*] 118
// + common
'Droid Sans','Droid Sans Mono','Droid Serif','Roboto','Roboto Condensed',
// + MOAR notos
'Noto Color Emoji','Noto Emoji','Noto Kufi Arabic','Noto Mono','Noto Naskh Arabic','Noto Nastaliq Urdu','Noto Sans','Noto Sans Adlam Unjoined',
'Noto Sans Anatolian Hieroglyphs','Noto Sans Arabic','Noto Sans Avestan','Noto Sans Brahmi','Noto Sans CJK JP','Noto Sans CJK KR',
'Noto Sans CJK SC','Noto Sans CJK TC','Noto Sans Carian','Noto Sans Cuneiform','Noto Sans Cypriot','Noto Sans Display',
'Noto Sans Egyptian Hieroglyphs','Noto Sans Glagolitic','Noto Sans Gothic','Noto Sans Imperial Aramaic','Noto Sans Inscriptional Pahlavi',
'Noto Sans Inscriptional Parthian','Noto Sans JP','Noto Sans KR','Noto Sans Kaithi','Noto Sans Kharoshthi','Noto Sans Linear B',
'Noto Sans Lycian','Noto Sans Lydian','Noto Sans Mono','Noto Sans Ogham','Noto Sans Old Italic','Noto Sans Old Persian',
'Noto Sans Old South Arabian','Noto Sans Old Turkic','Noto Sans Phags Pa','Noto Sans Phoenician','Noto Sans SC','Noto Sans Syriac Eastern',
'Noto Sans Syriac Estrangela','Noto Sans Syriac Western','Noto Sans TC','Noto Sans Tibetan','Noto Sans Ugaritic','Noto Serif',
'Noto Serif CJK JP','Noto Serif CJK KR','Noto Serif CJK SC','Noto Serif CJK TC','Noto Serif Display',
'Noto Color Emoji','Noto Emoji','Noto Kufi Arabic','Noto Mono','Noto Naskh Arabic','Noto Nastaliq Urdu','Noto Sans','Noto Sans Adlam Unjoined','Noto Sans Anatolian Hieroglyphs','Noto Sans Arabic','Noto Sans Armenian','Noto Sans Avestan','Noto Sans Brahmi','Noto Sans CJK JP','Noto Sans CJK KR','Noto Sans CJK SC','Noto Sans CJK TC','Noto Sans Carian','Noto Sans Cuneiform','Noto Sans Cypriot','Noto Sans Display','Noto Sans Egyptian Hieroglyphs','Noto Sans Glagolitic','Noto Sans Gothic','Noto Sans Hebrew','Noto Sans Imperial Aramaic','Noto Sans Inscriptional Pahlavi','Noto Sans Inscriptional Parthian','Noto Sans JP','Noto Sans KR','Noto Sans Kaithi','Noto Sans Kharoshthi','Noto Sans Linear B','Noto Sans Lycian','Noto Sans Lydian','Noto Sans Mono','Noto Sans Ogham','Noto Sans Old Italic','Noto Sans Old Persian','Noto Sans Old South Arabian','Noto Sans Old Turkic','Noto Sans Phags Pa','Noto Sans Phoenician','Noto Sans SC','Noto Sans Syriac Eastern','Noto Sans Syriac Estrangela','Noto Sans Syriac Western','Noto Sans TC','Noto Sans Thai','Noto Sans Tibetan','Noto Sans Ugaritic','Noto Serif','Noto Serif Armenian','Noto Serif CJK JP','Noto Serif CJK KR','Noto Serif CJK SC','Noto Serif CJK TC','Noto Serif Display','Noto Serif Hebrew','Noto Serif Thai',
// + vendor
// ToDo: SamsungOneUI*, SamsungNeo*, vendor specific
'Dancing Script',
Expand All @@ -188,13 +151,11 @@ let fntMaster = {
'Arial','Asana Math','Cambria Math','Charis SIL Compact','DejaVu Math TeX Gyre','DejaVu Sans','DejaVu Serif','Droid Sans Fallback','Droid Sans Hebrew','Droid Sans Japanese','Droid Sans Thai','Google Sans','Latin Modern Math','Libertinus Math','Noto Sans Mono CJK JP','Noto Sans Mono CJK KR','Noto Sans Mono CJK SC','Noto Sans Mono CJK TC','SEC CJK JP','SEC CJK KR','SEC CJK SC','SEC CJK TC','SEC Mono CJK JP','SEC Mono CJK KR','SEC Mono CJK SC','SEC Mono CJK TC','STIX Math','STIX Two Math','STIXGeneral','TeX Gyre Bonum Math','TeX Gyre Pagella Math','TeX Gyre Schola','TeX Gyre Termes Math','XITS Math',
],
'linux': [
// we start with bundled[linux] 134?
// we start with bundled[linux] 134
// + always
'Arial','Courier','Courier New',
// + common notos
'Noto Emoji','Noto Sans','Noto Serif','Noto Sans Tibetan',
// + old noto font names
'Noto Sans Symbols2','Noto Serif Hmong Nyiakeng',
// + some selective kBase ubuntu or fedora
// notos
'Noto Color Emoji','Noto Mono','Noto Serif CJK JP','Noto Serif CJK KR','Noto Serif CJK SC','Noto Serif CJK TC',
Expand Down Expand Up @@ -303,20 +264,6 @@ function set_fntList(os = isOS) {
"generic": [],
}

// we can drop this once isSmart += 115
if (isTB && isVer < 115) {
fntMaster["bundled"] = {
// all: win/mac/linux: 97 sans, 21 serif
'allnotosans': ['Adlam','Balinese','Bamum','Bassa Vah','Batak','Bengali','Buginese','Buhid','Canadian Aboriginal','Chakma','Cham','Cherokee','Coptic','Deseret','Devanagari','Elbasan','Ethiopic','Georgian','Grantha','Gujarati','Gunjala Gondi','Gurmukhi','Hanifi Rohingya','Hanunoo','Javanese','Kannada','Kayah Li','Khmer','Khojki','Khudawadi','Lao','Lepcha','Limbu','Lisu','Mahajani','Malayalam','Mandaic','Masaram Gondi','Medefaidrin','Meetei Mayek','Mende Kikakui','Miao','Modi','Mongolian','Mro','Multani','Myanmar','NKo','New Tai Lue','Newa','Ol Chiki','Oriya','Osage','Osmanya','Pahawh Hmong','Pau Cin Hau','Rejang','Runic','Samaritan','Saurashtra','Sharada','Shavian','Sinhala','Sora Sompeng','Soyombo','Sundanese','Syloti Nagri','Symbols','Symbols2','Syriac','Tagalog','Tagbanwa','Tai Le','Tai Tham','Tai Viet','Takri','Tamil','Telugu','Thaana','Tifinagh','Tifinagh APT','Tifinagh Adrar','Tifinagh Agraw Imazighen','Tifinagh Ahaggar','Tifinagh Air','Tifinagh Azawagh','Tifinagh Ghat','Tifinagh Hawad','Tifinagh Rhissa Ixa','Tifinagh SIL','Tifinagh Tawellemmet','Tirhuta','Vai','Wancho','Warang Citi','Yi','Zanabazar Square',],
'allnotoserif': ['Balinese','Bengali','Devanagari','Dogra','Ethiopic','Georgian','Grantha','Gujarati','Gurmukhi','Hmong Nyiakeng','Kannada','Khmer','Khojki','Lao','Malayalam','Myanmar','Sinhala','Tamil','Telugu','Tibetan','Yezidi',],
'android': [],
// then linux +16, mac +5, win +4
'linux': ['Arimo','Cousine','Noto Naskh Arabic','Noto Sans Armenian','Noto Sans Hebrew','Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC','Noto Sans Thai','Noto Serif Armenian','Noto Serif Hebrew','Noto Serif Thai','STIX Math','Tinos','Twemoji Mozilla',],
'mac': ['Noto Sans Armenian','Noto Sans Hebrew','Noto Serif Armenian','Noto Serif Hebrew','STIX Math',],
'windows': ['Noto Naskh Arabic','Noto Sans','Noto Serif','Twemoji Mozilla',],
}
}

// baseSize: add fallback for misconfigured/missing
// isPlatformFont: expected + can't be blocked + differs vs most fonts
// no entropy loss: size collisions of expected system fonts e.g. Tahoma
Expand Down Expand Up @@ -407,6 +354,7 @@ function set_fntList(os = isOS) {
log_alert(SECT12, "dupes in "+ os +" font list")
fntData["full"] = aCheck
}

// fntBtn
let str = "fonts_"+ os
fntData["full"].push(fntFake)
Expand Down

0 comments on commit f480562

Please sign in to comment.