Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)