Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Textstyle.set_extended_font_data() bold and italic seems to be switched #776

Closed
subsurfaceiodev opened this issue Nov 10, 2022 · 1 comment

Comments

@subsurfaceiodev
Copy link

Hi! When using something like this:

import ezdxf
doc = ezdxf.new()
text_style = doc.styles.add("Arial", font="Arial.ttf")
text_style.set_extended_font_data(family='Arial', italic=False, bold=True)
msp = doc.modelspace()
msp.add_text("my text", dxfattribs={"style": "Arial"})
doc.saveas("file.dxf")

The line text_style.set_extended_font_data(family='Arial', italic=False, bold=True) produces text in ITALIC instead of BOLD. When setting italic=True, bold=False the text is in BOLD instead of ITALIC. So it seems to be that they are actually reversed.

@mozman
Copy link
Owner

mozman commented Nov 11, 2022

Thank you!

@mozman mozman closed this as completed in 0e6a753 Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants