Opened 6 years ago
Last modified 6 years ago
#7151 closed enhancement
DXF: Support text styles (font name, bold, italic) — at Initial Version
Reported by: | Alan Thomas | Owned by: | Alan Thomas |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | dxf |
Cc: |
Description
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 the ability to write 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.