Skip to content

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

@subsurfaceiodev

Description

@subsurfaceiodev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions