Skip to content

Independent x/y scales do not respect normalized (or global) units for text #348

@cfhammill

Description

@cfhammill

I was trying to make a diagram composed of an unknown number of sub-diagrams of different sizes, and I wanted them to all have the same label size. Unexpectedly (to me) scaling x or y independently didn't preserve the global font size, making fonts appear stretched.

Here are a few examples:

figBig = (text "hi" # fontSizeN 0.1 <> square 1)
                         ===
      (scale 2 (text "hi" # fontSizeN 0.1 <> square 1))

looks like:
big

Here the font is left unscaled (as desired). But if I scale x or y independently

figWide = (text "hi" # fontSizeN 0.1 <> square 1)
                         ===
      (scaleX 2 (text "hi" # fontSizeN 0.1 <> square 1))      

figTall = (text "hi" # fontSizeN 0.1 <> square 1)
                         ===
      (scaleY 2 (text "hi" # fontSizeN 0.1 <> square 1))

I get
wide
and
tall

where the fonts are stretched.

Is this the desired behaviour? And if so is there any way to avoid it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions