fontsize not respected in Drawing

Issue #15 resolved
Former user created an issue

Thanks for the library. Recently I noticed that fontsize is not used by Drawing. One now needs to set size to adjust the size of the font.

Minimal example

import SchemDraw

ARM_LENGTH = 0.5

JJ = {
    'base': e.LINE,
    'paths': [
        [[-ARM_LENGTH, -ARM_LENGTH], [ARM_LENGTH, ARM_LENGTH ]],
        [[-ARM_LENGTH, ARM_LENGTH ], [ARM_LENGTH, -ARM_LENGTH]]
    ]
}

debug = SchemDraw.Drawing(
    fontsize=8,
    font='serif',
    unit=2.5,
    inches_per_unit=0.226,
    lw=1,
    txtofst=0.05
)

jj = debug.add(JJ)
jj.add_label("Label")

debug.draw()

Produces large text and changing fontsize to size results in the correctly sized text. This might be an intentional change, but the documentation stil refers to fontsize.

Comments (2)

  1. Log in to comment