Fix tests for CI?
Python CI / test (push) Failing after 7m45s

This commit is contained in:
2025-11-04 22:30:04 +01:00
parent 9ba35d2fa8
commit 37505d3dcc
5 changed files with 148 additions and 31 deletions
+9 -1
View File
@@ -53,7 +53,15 @@ def paragraph_layouter(paragraph: Paragraph, page: Page, start_word: int = 0, pr
text_align = Alignment.LEFT # Default alignment
else:
# paragraph.style is an AbstractStyle, resolve it
rendering_context = RenderingContext(base_font_size=paragraph.style.font_size)
# Ensure font_size is an int (it could be a FontSize enum)
from pyWebLayout.style.abstract_style import FontSize
if isinstance(paragraph.style.font_size, FontSize):
# Use a default base font size, the resolver will handle the semantic size
base_font_size = 16
else:
base_font_size = int(paragraph.style.font_size)
rendering_context = RenderingContext(base_font_size=base_font_size)
style_resolver = StyleResolver(rendering_context)
style_registry = ConcreteStyleRegistry(style_resolver)
concrete_style = style_registry.get_concrete_style(paragraph.style)