Skip to content

Commit

Permalink
fix font name "OpenSans-Regular.ttf"
Browse files Browse the repository at this point in the history
  • Loading branch information
mozman committed Feb 5, 2025
1 parent 493fe87 commit cb5a50a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_05_tools/test_523_text_size.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, Manfred Moitzi
# Copyright (c) 2021-2025, Manfred Moitzi
# License: MIT License

import pytest
Expand Down Expand Up @@ -77,7 +77,7 @@ def test_measurement_of_plain_text(msp, s):
def test_support_for_text_size():
test_string = "TestString"
doc = ezdxf.new()
doc.styles.add("OpenSans", font="OpenSans.ttf")
doc.styles.add("OpenSans", font="OpenSans-Regular.ttf")
text = doc.modelspace().add_text(
test_string,
dxfattribs={
Expand All @@ -87,8 +87,7 @@ def test_support_for_text_size():
)
length = len(test_string)
size = text_size(text)
# Do not check exact measurements, "arial.ttf" is not available at all
# platforms by default!
# Do not check exact measurements!
assert length * 1.0 < size.width < length * 2.0
assert 1.95 < size.cap_height < 2.05
assert size.total_height > size.cap_height
Expand Down

0 comments on commit cb5a50a

Please sign in to comment.