Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#7151 closed enhancement (fixed)

DXF: Support text styles (font name, bold, italic)

Reported by: Alan Thomas Owned by: Alan Thomas
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf
Cc:

Description (last modified by Alan Thomas)

The DXF STYLE table contains information about text formatting, including width, obliqueness, text height, font name, bold and italic. From experimentation with AutoCAD it appears that most of these properties are only used as templates for newly-created TEXT entities, and not actually inherited to TEXT entities in the DXF (like DIMSTYLEs). But font name, bold and italic appear to be exceptions to this.

Currently OGR outputs the text style name in the f parameter of the style string. This is wrong; f is for the font name. I correct this behaviour in the patch. If no font name is available, "Arial" continues to be used as the fallback.

This patch also adds support for bo (bold), it (italic) and w (width factor) style parameters.

Additionally, it fixes a bug where a TEXT entity with alignment point x-coordinate (group code 11) equal to 0 would be missing the dx parameter in the style string, even when that parameter would have been nonzero. Likewise for the y-coordinate.

Change History (3)

comment:1 Changed 13 months ago by Alan Thomas

Description: modified (diff)

comment:2 Changed 13 months ago by Alan Thomas

Resolution: fixed
Status: assignedclosed

In 40715:

DXF: Support text styles (fixes #7151); various corrections for ByBlock/ByLayer? styling (refs #7130)

comment:3 Changed 13 months ago by Alan Thomas

In 40779:

DXF: Make ACAdjustText also transform text width and offset (refs #7151)

Note: See TracTickets for help on using tickets.