Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 4
0
 def test_otf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('otfpoc.otf'))
     self.assertIn('otfpoc', font.get_info().names)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 10
0
 def test_ttf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('seriously.ttf'))
     self.assertIn('Seriously', font.get_info().names)
Esempio n. 11
0
 def test_otf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('otfpoc.otf'))
     self.assertIn('otfpoc', font.get_info().names)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 18
0
 def test_ttf_name_matches(self):
     font = TTFFont(get_file_in_test_directory('seriously.ttf'))
     self.assertIn('Seriously', font.get_info().names)
Esempio n. 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)
Esempio n. 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)