Beispiel #1
0
 def test_non_regular(self):
     map_family, map_style = build_stylemap_names(family_name="NotoSans",
                                                  style_name="ExtraBold",
                                                  is_bold=False,
                                                  is_italic=False,
                                                  linked_style=None)
     self.assertEqual("NotoSans ExtraBold", map_family)
     self.assertEqual("regular", map_style)
Beispiel #2
0
 def test_regular_isItalic(self):
     map_family, map_style = build_stylemap_names(family_name="NotoSans",
                                                  style_name="Regular",
                                                  is_bold=False,
                                                  is_italic=True,
                                                  linked_style=None)
     self.assertEqual("NotoSans Regular", map_family)
     self.assertEqual("italic", map_style)
Beispiel #3
0
 def test_linked_style_regular(self):
     map_family, map_style = build_stylemap_names(family_name="NotoSans",
                                                  style_name="Condensed",
                                                  is_bold=False,
                                                  is_italic=False,
                                                  linked_style="Cd")
     self.assertEqual("NotoSans Cd", map_family)
     self.assertEqual("regular", map_style)
Beispiel #4
0
 def test_bold_italic(self):
     map_family, map_style = build_stylemap_names(family_name="NotoSans",
                                                  style_name="Bold Italic",
                                                  is_bold=True,
                                                  is_italic=True,
                                                  linked_style=None)
     self.assertEqual("NotoSans", map_family)
     self.assertEqual("bold italic", map_style)
Beispiel #5
0
    def test_incomplete_bold_italic(self):
        map_family, map_style = build_stylemap_names(
            family_name="NotoSans",
            style_name="Bold",  # will be stripped...
            is_bold=True,
            is_italic=True,
            linked_style=None)
        self.assertEqual("NotoSans", map_family)
        self.assertEqual("bold italic", map_style)

        map_family, map_style = build_stylemap_names(
            family_name="NotoSans",
            style_name="Italic",  # will be stripped...
            is_bold=True,
            is_italic=True,
            linked_style=None)
        self.assertEqual("NotoSans", map_family)
        self.assertEqual("bold italic", map_style)
Beispiel #6
0
 def test_bold_italic_no_style_link(self):
     map_family, map_style = build_stylemap_names(
         family_name="NotoSans",
         style_name="Bold Italic",
         is_bold=False,  # not style-linked, despite the name
         is_italic=False,  # not style-linked, despite the name
         linked_style=None)
     self.assertEqual("NotoSans Bold Italic", map_family)
     self.assertEqual("regular", map_style)