示例#1
0
 def test_parses_fonts_with_platform_id_2_strings(self):
     font = TTFFont(get_file_in_test_directory('VANTATHI.TTF'))
     self.assertIn('Vanta Thin', font.get_info().names)
示例#2
0
 def test_detects_bold_only_font(self):
     font = TTFFont(get_file_in_test_directory('Caviar Dreams Bold.ttf'))
     self.assertIs(font.get_info().bold, True)
示例#3
0
 def test_detects_italic_bold_font(self):
     font = TTFFont(get_file_in_test_directory('CaviarDreams_BoldItalic.ttf'))
     self.assertIs(font.get_info().italic, True)
     self.assertIs(font.get_info().bold, True)
示例#4
0
 def test_otf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('otfpoc.otf'))
     self.assertIn('otfpoc', font.get_info().names)
示例#5
0
 def test_jorvik_v2_name_matches(self):
     font = TTFFont(get_file_in_test_directory('Jorvik.ttf'))
     self.assertIn('Jorvik Informal V2', font.get_info().names)
示例#6
0
 def test_detects_regular_weight(self):
     font = TTFFont(get_file_in_test_directory('Jorvik.ttf'))
     self.assertEqual(font.get_info().weight, FontWeight.FW_NORMAL)
示例#7
0
 def test_parses_fonts_with_utf8_platform_id_0_strings(self):
     font = TTFFont(get_file_in_test_directory('SUSANNA_.otf'))
     self.assertIn('Susanna', font.get_info().names)
示例#8
0
 def test_jorvik_v2_name_matches(self):
     font = TTFFont(get_file_in_test_directory('Jorvik.ttf'))
     self.assertIn('Jorvik Informal V2', font.get_info().names)
示例#9
0
 def test_detects_bold_only_font(self):
     font = TTFFont(get_file_in_test_directory('Caviar Dreams Bold.ttf'))
     self.assertIs(font.get_info().bold, True)
示例#10
0
 def test_ttf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('seriously.ttf'))
     self.assertIn('Seriously', font.get_info().names)
示例#11
0
 def test_otf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('otfpoc.otf'))
     self.assertIn('otfpoc', font.get_info().names)
示例#12
0
 def test_detects_medium_weight(self):
     font = TTFFont(get_file_in_test_directory('seriously.ttf'))
     self.assertEqual(font.get_info().weight, FontWeight.FW_MEDIUM)
示例#13
0
 def test_detects_regular_weight(self):
     font = TTFFont(get_file_in_test_directory('Jorvik.ttf'))
     self.assertEqual(font.get_info().weight, FontWeight.FW_NORMAL)
示例#14
0
 def test_detects_bold_weight(self):
     font = TTFFont(get_file_in_test_directory('Caviar Dreams Bold.ttf'))
     self.assertEqual(font.get_info().weight, FontWeight.FW_BOLD)
示例#15
0
 def test_parses_fonts_with_utf8_platform_id_0_strings(self):
     font = TTFFont(get_file_in_test_directory('SUSANNA_.otf'))
     self.assertIn('Susanna', font.get_info().names)
示例#16
0
 def test_detects_italic_bold_font(self):
     font = TTFFont(
         get_file_in_test_directory('CaviarDreams_BoldItalic.ttf'))
     self.assertIs(font.get_info().italic, True)
     self.assertIs(font.get_info().bold, True)
示例#17
0
 def test_detects_bold_weight(self):
     font = TTFFont(get_file_in_test_directory('Caviar Dreams Bold.ttf'))
     self.assertEqual(font.get_info().weight, FontWeight.FW_BOLD)
示例#18
0
 def test_ttf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('seriously.ttf'))
     self.assertIn('Seriously', font.get_info().names)
示例#19
0
 def test_detects_medium_weight(self):
     font = TTFFont(get_file_in_test_directory('seriously.ttf'))
     self.assertEqual(font.get_info().weight, FontWeight.FW_MEDIUM)
示例#20
0
 def test_parses_fonts_with_platform_id_2_strings(self):
     font = TTFFont(get_file_in_test_directory('VANTATHI.TTF'))
     self.assertIn('Vanta Thin', font.get_info().names)