Skip to content

Middle Center attributes are drawn with their baseline on the alignment point #3015

Open

Description

@cdwilson127

Description

An ATTRIB with Middle Center justification (group 72 = 1, group 74 = 2) is drawn and plotted with its baseline on the alignment point, so the text sits about half a text height too high. AutoCAD and GstarCAD draw the same attribute centred on the alignment point.

Left Middle attributes (72 = 0, 74 = 2) in the same block are drawn correctly, so the vertical offset seems to be dropped only when the horizontal alignment is Center.

Case

  • Title block with a nested block per revision row. Each row has attributes REV, DESCRIPTION, JOBNO, DRAWN, DATE, height 1.5, in cells 3.3 high.
  • DESCRIPTION is Left Middle; the others are Middle Center, with the alignment point on the cell's centre line.
  • In CADCraft the Middle Center values touch the top of their cells; DESCRIPTION is centred. In AutoCAD/GstarCAD all are centred.
  • DXF values checked with ezdxf after an ODA round trip: 72 = 1, 74 = 2, alignment point on the cell centre.

Workaround

Change the attributes to Center (72 = 1, 74 = 0) with the alignment point half a text height lower. This looks the same in AutoCAD and CADCraft.

Version

CADCraft 0.19.0 (227e3c3), Windows 11.

Activity

  1. added
    bug
    duplicate
    on Nov 10, 2026
  2. ticket-craft commented on Nov 10, 2026

    @ticket-craft

    Possible duplicate of #2411.

    This is being worked on in #1591.

    Possibly related: #2229 and #2464.

  3. added and removed
    duplicate
    on Nov 13, 2026
  4. FredApps commented on Nov 13, 2026

    @FredApps
    Contributor

    #2411 and PR #1591 address one source of lost vertical attribute alignment. Please share a non-confidential sample and whether the file was opened as DWG or DXF, so we can establish whether that fix covers this case.

  5. cdwilson127 commented on Nov 14, 2026

    @cdwilson127
    Author

    The file was opened as DWG (drawn in GstarCAD, saved as DWG). The DXF values in the report were read with ezdxf after converting that DWG to DXF with the ODA File Converter.

    The original drawing is a customer job, so I can't share it. Attached is a synthetic sample that has the same structure: attrib_middle_center.dxf and the same drawing as attrib_middle_center.dwg (converted with the ODA File Converter). Block REVROW is a 60 × 3.3 row with three attributes of height 1.5, each with its alignment point on the row's centre line (y = 1.65):

    • REV: Middle Center (72 = 1, 74 = 2)
    • DESCRIPTION: Left Middle (72 = 0, 74 = 2)
    • DATE: Middle Center (72 = 1, 74 = 2)

    There is one insert at 0,0. In AutoCAD or GstarCAD all three values are centred in the row.

    What I ran, with cadcraft-cli convert to DXF and PNG, reading groups 72/74 of the output:

    Build Opened as DXF Opened as DWG
    main at fbb0838 74 = 2 kept, all three centred 74 dropped on all six ATTDEF/ATTRIB (DESCRIPTION too); the values sit with their baseline on the centre line
    main + #1591 74 = 2 kept, centred 74 = 2 kept, centred; the render matches the DXF one

    So #1591 covers this case, through DWG too. #3016 (the block editor appearing to change the justification) has the same cause. I'll re-check both with the original drawing once #1591 is merged, and close them if nothing changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions