@@ -55,10 +55,8 @@ const langIDMap = {
5555
5656function createNameTuple ( nameTable , langID , family , style , localizedStyle ) {
5757 const compat = compatibilityName ( family , style ) ;
58- if ( ! compat . standardFour ) {
59- nameTable . push ( nameEntry ( WINDOWS , UNICODE , langID , PREFERRED_FAMILY , family ) ) ;
60- nameTable . push ( nameEntry ( WINDOWS , UNICODE , langID , PREFERRED_STYLE , style ) ) ;
61- }
58+ nameTable . push ( nameEntry ( WINDOWS , UNICODE , langID , PREFERRED_FAMILY , family ) ) ;
59+ nameTable . push ( nameEntry ( WINDOWS , UNICODE , langID , PREFERRED_STYLE , style ) ) ;
6260 nameTable . push ( nameEntry ( WINDOWS , UNICODE , langID , FAMILY , compat . family ) ) ;
6361 const compatStyle = compat . standardFour ? localizedStyle : compat . style ;
6462 nameTable . push ( nameEntry ( WINDOWS , UNICODE , langID , STYLE , compatStyle ) ) ;
@@ -77,7 +75,7 @@ function createNameTuple(nameTable, langID, family, style, localizedStyle) {
7775 }
7876}
7977
80- async function nameFont ( ctx , demand , selectorList , encodings , namings ) {
78+ async function nameFont ( ctx , demand , fMono , selectorList , encodings , namings ) {
8179 const font = this . items [ demand ] ;
8280 const nameTable = [ ] ;
8381 const defaultNg = namings . en_US ;
@@ -121,6 +119,19 @@ async function nameFont(ctx, demand, selectorList, encodings, namings) {
121119 cp850 : true ,
122120 ascii : true
123121 } ;
122+ // Set Panose bits
123+ font . OS_2 . panose = [
124+ 2 ,
125+ 0 ,
126+ ( 1 + font . OS_2 . usWeightClass / 100 ) | 0 ,
127+ fMono ? 9 : 0 ,
128+ 0 ,
129+ 0 ,
130+ 0 ,
131+ 0 ,
132+ 0 ,
133+ 0
134+ ] ;
124135}
125136
126137exports . nameFont = nameFont ;
0 commit comments