@@ -125,10 +125,14 @@ let fntMaster = {
125
125
'ヘルベチカ' , 'タイムズロマン' , 'クーリエ' , // Arial, TNR, Courier - >Courier New
126
126
] ,
127
127
windowsface : [
128
+ // weighted
128
129
'Arial Black' , 'Segoe UI Light' , 'Segoe UI Semibold' , // 7
129
130
'Segoe UI Semilight' , // 8
130
131
'Microsoft JhengHei Light' , 'Microsoft YaHei Light' , 'Segoe UI Black' , // 8.1
131
132
'Malgun Gothic Semilight' , // 10
133
+ // other
134
+ 'Georgia' , 'MS Gothic' , 'Tahoma' , // system
135
+ 'Noto Sans Gujarati' , 'Noto Serif Dogra' , 'Twemoji Mozilla' , // bundled
132
136
] ,
133
137
} ,
134
138
// TB unexpected
@@ -138,6 +142,7 @@ let fntMaster = {
138
142
'Noto Color Emoji' , 'Noto Emoji' , 'Noto Mono' , 'Noto Sans' , 'Noto Serif' , // notos
139
143
'Cantarell' , 'DejaVu Sans' , 'DejaVu Serif' , 'Droid Sans' , 'STIX' , // fedora
140
144
'Dingbats' , 'FreeMono' , 'Ubuntu' , // ubuntu
145
+ 'Bitstream Charter' , 'C059' , 'Nimbus Sans' , 'P052' , 'Quicksand' , // debian
141
146
'Liberation Mono' , 'Liberation Sans' , 'Liberation Serif' , // popular
142
147
'Noto Serif Hmong Nyiakeng' , 'Noto Sans Symbols2' , 'STIX Math' , // TB12 fontnames
143
148
] ,
@@ -147,16 +152,24 @@ let fntMaster = {
147
152
'.Helvetica Neue DeskInterface' , // dot-prefixed font families on mac = hidden // tb#42377
148
153
] ,
149
154
windows : [
150
- 'Calibri' , 'Candara' , // 'Corbel','Ebrima','Gabriola ', // system
151
- 'MS Dlg Shell' , // system that should point to Microsoft Sans Serif
155
+ 'Calibri' , 'Candara' , // system
156
+ 'MS Shell Dlg ' , // system alias == Microsoft Sans Serif
152
157
'Gill Sans' , 'Gill Sans MT' , // MS bundled
153
- 'Noto Serif Hmong Nyiakeng' , // 'Noto Sans Symbols2', // TB12 fontnames
158
+ // other
159
+ 'Noto Sans Symbols2' , // TB12 bundled
154
160
] ,
155
161
windowsface : [
162
+ // weighted
156
163
// 'Arial Narrow', // ToDo: uncomment once we block it
157
164
'Calibri Light' , // 8
158
165
'Microsoft JhengHei UI Light' , 'Nirmala UI Semilight' , // 8.1
159
166
'Candara Light' , 'Corbel Light' , 'Yu Gothic UI Light' , // 10
167
+ // other
168
+ 'Corbel' , 'Ebrima' , // system
169
+ 'Gill Sans' , 'Gill Sans MT' , // MS bundled
170
+ 'Noto Serif Hmong Nyiakeng' , // TB12 bundled
171
+ 'Arabic Transparent' , // fontSubstitutes do not apply even if allowed
172
+ 'MS Serif' , 'Roman' , // system aliases do not apply even if allowed
160
173
] ,
161
174
} ,
162
175
// kBaseFonts: https://searchfox.org/mozilla-central/search?path=StandardFonts*.inc
@@ -270,6 +283,7 @@ let fntMaster = {
270
283
//*/
271
284
] ,
272
285
windowsface :[
286
+ // weighted
273
287
'Arial Black' , 'Arial Narrow' , 'Segoe UI Light' , 'Segoe UI Semibold' , // 7
274
288
'Calibri Light' , 'Segoe UI Semilight' , // 8
275
289
// 8.1
@@ -297,7 +311,7 @@ let fntMaster = {
297
311
'Shonar Bangla' , 'Shruti' , 'SimHei' , 'Simplified Arabic' , 'Traditional Arabic' , 'Tunga' , 'UD Digi Kyokasho N-B' , 'UD Digi Kyokasho N-R' ,
298
312
'UD Digi Kyokasho NK-B' , 'UD Digi Kyokasho NK-R' , 'UD Digi Kyokasho NP-B' , 'UD Digi Kyokasho NP-R' , 'Urdu Typesetting' , 'Utsaah' ,
299
313
'Vani' , 'Vijaya' , 'Vrinda' , 'Yu Mincho' ,
300
- // localized ^
314
+ // localized from ^
301
315
'바탕' , // Batang
302
316
'BIZ UDPゴシック' , // BIZ UDPGothic
303
317
'굴림' , // Gulim
@@ -469,7 +483,6 @@ let fntMaster = {
469
483
}
470
484
471
485
function set_fntList ( ) {
472
- let fntListBaseName = isTB ? 'allowlist' : 'kBaseFonts'
473
486
let build = ( gLoad || isFontSizesMore !== isFontSizesPrevious )
474
487
475
488
if ( build ) {
@@ -620,39 +633,52 @@ function set_fntList() {
620
633
fntData . baselang . sort ( )
621
634
fntData . fpp . sort ( )
622
635
fntData . full . sort ( )
623
- // fntBtns
624
- let str = 'fonts_' + isOS , fntBtnBundled , fntBtnSystem , fntBtnBase , fntBtnBaseLang , fntBtnFPP , fntBtnUnexpected , fntBtnAll
625
- fntBtnBundled = addButton ( 12 , str + '_bundled' , fntData . bundled . length , 'btnc' , 'lists' )
626
- fntBtnSystem = addButton ( 12 , str + '_system' , fntData . system . length , 'btnc' , 'lists' )
627
- fntBtnUnexpected = addButton ( 12 , str + '_unexpected' , fntData . unexpected . length , 'btnc' , 'lists' )
628
- fntBtnBase = addButton ( 12 , str + '_' + fntListBaseName , fntData . base . length , 'btnc' , 'lists' )
629
- fntBtnBaseLang = addButton ( 12 , str + '_kLangPackFonts' , fntData . baselang . length , 'btnc' , 'lists' )
630
- fntBtnFPP = addButton ( 12 , str + '_FPP' , fntData . fpp . length , 'btnc' , 'lists' )
631
- fntBtnAll = addButton ( 12 , str , fntData . full . length , 'btnc' , 'lists' )
636
+
632
637
// fntBtn
633
- if ( 'android' == isOS ) {
634
- fntBtn = fntBtnAll
635
- } else if ( isTB ) {
636
- fntBtn = fntBtnSystem + ' + ' + fntBtnBundled + ' = ' + fntBtnBase + ' + ' + fntBtnUnexpected + ' = ' + fntBtnAll
637
- } else if ( 'windows' == isOS ) {
638
- fntBtn = fntBtnBase + ' + ' + fntBtnBaseLang + ' = ' + fntBtnFPP + ' + ' + fntBtnUnexpected + ' = ' + fntBtnAll
638
+ let fntobj = { }
639
+ if ( 'android' == isOS || ! isTB && 'linux' == isOS ) {
640
+ fntobj = fntData . full
641
+ } else if ( isTB || 'windows' == isOS ) {
642
+ if ( isTB ) {
643
+ fntobj = { '1. system' : { count : fntData . system . length , 'fonts' : fntData . system } ,
644
+ '2. bundled' : { count : fntData . bundled . length , 'fonts' : fntData . bundled } ,
645
+ '3. allowlist' : { count : fntData . base . length , 'fonts' : fntData . base } ,
646
+ }
647
+ } else {
648
+ fntobj = { '1. kBaseFonts' : { count : fntData . base . length , 'fonts' : fntData . base } ,
649
+ '2. kLangPackFonts' : { count : fntData . baselang . length , 'fonts' : fntData . baselang } ,
650
+ '3. FPP' : { count : fntData . fpp . length , 'fonts' : fntData . fpp } ,
651
+ }
652
+ }
653
+ fntobj [ '4. unexpected' ] = { count : fntData . unexpected . length , 'fonts' : fntData . unexpected }
654
+ fntobj [ '5. tested' ] = { count : fntData . full . length , 'fonts' : fntData . full }
639
655
} else {
640
- fntBtn = ( isOS !== 'linux' ? fntBtnBase : '' ) + fntBtnAll
656
+ //mac
657
+ fntobj = { '1. kBaseFonts' : { count : fntData . base . length , 'fonts' : fntData . base } ,
658
+ '2. unexpected' : { count : fntData . unexpected . length , 'fonts' : fntData . unexpected } ,
659
+ '3. tested' : { count : fntData . full . length , 'fonts' : fntData . full } ,
660
+ }
641
661
}
642
- // fntBtnFaces
643
- let fntBtnFaces = '' , strface = 'font_faces_' + isOS
662
+ fntData [ 'summary' ] = fntobj
663
+ fntBtn = addButton ( 12 , 'fonts_' + isOS , fntData . full . length + ' fonts' , 'btnc' , 'lists' )
664
+
665
+ // fontFaces
644
666
if ( fntFaceData . full . length ) {
645
- fntBtnUnexpected = addButton ( 12 , strface + '_unexpected' , fntFaceData . unexpected . length , 'btnc' , 'lists' )
646
- fntBtnBase = addButton ( 12 , strface + '_' + fntListBaseName , fntFaceData . base . length , 'btnc' , 'lists' )
647
- fntBtnBaseLang = addButton ( 12 , strface + '_kLangPackFonts' , fntFaceData . baselang . length , 'btnc' , 'lists' )
648
- fntBtnFPP = addButton ( 12 , strface + '_FPP' , fntFaceData . fpp . length , 'btnc' , 'lists' )
649
- fntBtnAll = addButton ( 12 , strface , fntFaceData . full . length , 'btnc' , 'lists' )
650
667
if ( isTB ) {
651
- fntBtnFaces = fntBtnBase + ' + ' + fntBtnUnexpected + ' = ' + fntBtnAll
668
+ fntobj = { '1. allowlist' : { count : fntFaceData . base . length , 'fonts' : fntFaceData . base } ,
669
+ '2. unexpected' : { count : fntFaceData . unexpected . length , 'fonts' : fntFaceData . unexpected } ,
670
+ '3. tested' : { count : fntFaceData . full . length , 'fonts' : fntFaceData . full }
671
+ }
652
672
} else {
653
- fntBtnFaces = fntBtnBase + ' + ' + fntBtnBaseLang + ' = ' + fntBtnFPP + ' + ' + fntBtnUnexpected + ' = ' + fntBtnAll
673
+ fntobj = { '1. kBaseFonts' : { count : fntFaceData . base . length , 'fonts' : fntFaceData . base } ,
674
+ '2. kLangPackFonts' : { count : fntFaceData . baselang . length , 'fonts' : fntFaceData . baselang } ,
675
+ '3. FPP' : { count : fntFaceData . fpp . length , 'fonts' : fntFaceData . fpp } ,
676
+ '4. unexpected' : { count : fntFaceData . unexpected . length , 'fonts' : fntFaceData . unexpected } ,
677
+ '5. tested' : { count : fntFaceData . full . length , 'fonts' : fntFaceData . full }
678
+ }
654
679
}
655
- fntBtn = fntBtnFaces + ' | ' + fntBtn
680
+ fntFaceData [ 'summary' ] = fntobj
681
+ fntBtn = addButton ( 12 , 'font_faces_' + isOS , fntFaceData . full . length + ' faces' , 'btnc' , 'lists' ) + ' | ' + fntBtn
656
682
}
657
683
}
658
684
}
@@ -661,22 +687,8 @@ function set_fntList() {
661
687
662
688
// fnt*Btn data
663
689
if ( gRun || build ) {
664
- let str = 'fonts_' + isOS
665
- let strface = 'font_faces_' + isOS
666
- addDetail ( str + '_system' , fntData . system , 'lists' )
667
- addDetail ( str + '_bundled' , fntData . bundled , 'lists' )
668
- addDetail ( str + '_' + fntListBaseName , fntData . base , 'lists' )
669
- addDetail ( str + '_kLangPackFonts' , fntData . baselang , 'lists' )
670
- addDetail ( str + '_FPP' , fntData . fpp , 'lists' )
671
- addDetail ( str + '_unexpected' , fntData . unexpected , 'lists' )
672
- addDetail ( str , fntData . full , 'lists' )
673
- if ( fntFaceData . full . length ) {
674
- addDetail ( strface + '_' + fntListBaseName , fntFaceData . base , 'lists' )
675
- addDetail ( strface + '_kLangPackFonts' , fntFaceData . baselang , 'lists' )
676
- addDetail ( strface + '_FPP' , fntFaceData . fpp , 'lists' )
677
- addDetail ( strface + '_unexpected' , fntFaceData . unexpected , 'lists' )
678
- addDetail ( strface , fntFaceData . full , 'lists' )
679
- }
690
+ addDetail ( 'fonts_' + isOS , fntData . summary , 'lists' )
691
+ addDetail ( 'font_faces_' + isOS , fntFaceData . summary , 'lists' )
680
692
}
681
693
}
682
694
@@ -698,7 +710,7 @@ function get_document_fonts(METRIC) {
698
710
}
699
711
700
712
const get_fontfaces = ( METRIC ) => new Promise ( resolve => {
701
- // testing non regular fonts + font face leaks
713
+ // testing non regular fonts + font face leaks (i.e not just light/black etc)
702
714
// it is problematic to test weighted fonts because you don't know
703
715
// if it's synthesized, a variable font, or an actual font(name)
704
716
// blocking document fonts does not affect this test
0 commit comments