Пример #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)