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)
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)
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)
def test_otf_name_matches(self): font = TTFFont(get_file_in_test_directory('otfpoc.otf')) self.assertIn('otfpoc', font.get_info().names)
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)
def test_detects_regular_weight(self): font = TTFFont(get_file_in_test_directory('Jorvik.ttf')) self.assertEqual(font.get_info().weight, FontWeight.FW_NORMAL)
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)
def test_ttf_name_matches(self): font = TTFFont(get_file_in_test_directory('seriously.ttf')) self.assertIn('Seriously', font.get_info().names)
def test_detects_medium_weight(self): font = TTFFont(get_file_in_test_directory('seriously.ttf')) self.assertEqual(font.get_info().weight, FontWeight.FW_MEDIUM)
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)
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)