This commit is contained in:
parent
b57cc9f7ea
commit
b424c2d831
@ -252,7 +252,7 @@ def apply_element_font_styles(font: Font, tag_name: str, css_styles: Dict[str, s
|
||||
style=style,
|
||||
decoration=decoration,
|
||||
background=background,
|
||||
langauge=language
|
||||
language=language
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ class Font:
|
||||
style: FontStyle = FontStyle.NORMAL,
|
||||
decoration: TextDecoration = TextDecoration.NONE,
|
||||
background: Optional[Tuple[int, int, int, int]] = None,
|
||||
langauge = "en_EN"):
|
||||
language = "en_EN"):
|
||||
"""
|
||||
Initialize a Font object with the specified properties.
|
||||
|
||||
@ -54,7 +54,7 @@ class Font:
|
||||
self._style = style
|
||||
self._decoration = decoration
|
||||
self._background = background if background else (255, 255, 255, 0)
|
||||
self.language = langauge
|
||||
self.language = language
|
||||
# Load the font file or use default
|
||||
self._load_font()
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ class TestWord(unittest.TestCase):
|
||||
"""Set up test fixtures."""
|
||||
self.font = Font()
|
||||
# Note: Font background is a tuple (255, 255, 255, 0) by default
|
||||
# Note: Font language is set via constructor parameter (langauge - with typo)
|
||||
# Note: Font language is set via constructor parameter (language - with typo)
|
||||
|
||||
def test_word_creation_minimal(self):
|
||||
"""Test word creation with minimal parameters."""
|
||||
|
||||
@ -72,7 +72,7 @@ class TestStyleObjects(unittest.TestCase):
|
||||
style=FontStyle.ITALIC,
|
||||
decoration=TextDecoration.UNDERLINE,
|
||||
background=(255, 255, 0, 255),
|
||||
langauge="fr_FR"
|
||||
language="fr_FR"
|
||||
)
|
||||
|
||||
self.assertEqual(font._font_path, "/path/to/font.ttf")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user