def apply_temporary_fixes(font, is_for_cros=False):
 font_name = font_data.font_name(font)
 weight = noto_fonts.parse_weight(font_name)
 weight_number = noto_fonts.WEIGHTS[weight]
 if (is_for_cros and (weight == 'Thin')):
  weight_number = 100
 font['OS/2'].usWeightClass = weight_number
 name_records = font_data.get_name_records(font)
 family_name = name_records[1]
 if family_name.endswith('Black'):
  font['head'].macStyle |= (1 << 0)
  font['OS/2'].fsSelection |= (1 << 5)
  font['OS/2'].fsSelection &= (~ (1 << 6))

def apply_temporary_fixes ( font , is_for_cros = False ) : font_name = font_data . font_name ( font ) weight = noto_fonts . parse_weight ( font_name ) weight_number = noto_fonts . WEIGHTS [ weight ] if ( is_for_cros and ( weight == 'Thin' ) ) : weight_number = 100 font [ 'OS/2' ] . usWeightClass = weight_number name_records = font_data . get_name_records ( font ) family_name = name_records [ 1 ] if family_name . endswith ( 'Black' ) : font [ 'head' ] . macStyle |= ( 1 << 0 ) font [ 'OS/2' ] . fsSelection |= ( 1 << 5 ) font [ 'OS/2' ] . fsSelection &= ( ~ ( 1 << 6 ) )
apply some temporary fixes .