forked from 1b-agent/opencadstudio-upstream
fix(text): integrate ignored fields across text-bearing entities
- MultiLeader: stop double-scaling when ctx.text_height (WCS-baked) is set;
use it as-is and only multiply by scale_factor + anno on the fallback path.
ctx.text_width gets the same treatment.
- Text / Attribute: width_factor and oblique_angle are entity-authoritative.
The previous entity*style multiplication / addition mis-rendered any text
whose TXSTYLE had a non-default width_factor or oblique_angle (RR 0.6,
STYLE2 15°, Romans/ARIEL/A32 0.65-0.8 in the sample file).
- MText: honour TXSTYLE is_backward (negative width_factor mirror) and
is_upside_down (180° rotation). measure_mtext_chars uses positive
magnitude so anchor math stays correct under backward text.
- Tolerance: use tol.dimension_gap when set instead of the hard-coded
0.35 * height heuristic.
- Table: cell text height / font / alignment resolve through
CellContent -> CellStyle -> TableStyle.{title|header|data}_row_style
-> compiled-in defaults. Row classification respects the suppressed
flags. Cell + content rotation applied.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
ace99541d0
commit
62876b1081
7 files changed
+198
-55
No files matched your search
@@ -130,7 +130,13 @@ fn tessellate_tolerance(tol: &Tolerance) -> Vec<Vec<[f32; 2]>> {
|
||||
} else {
|
||||
2.5_f32
|
||||
};
|
||||
let gap = (h * 0.35).max(0.1);
|
||||
// DIMGAP — stored on the entity (resolved from the dim style at creation).
|
||||
// Fall back to AutoCAD's 0.35 × height convention only when missing.
|
||||
let gap = if tol.dimension_gap > 1e-6 {
|
||||
tol.dimension_gap as f32
|
||||
} else {
|
||||
(h * 0.35).max(0.1)
|
||||
};
|
||||
let cell_h = h + 2.0 * gap;
|
||||
let char_w = h * 0.65;
|
||||
let min_cell_w = h * 1.4;
|
||||
|
||||
Reference in new issue
Block a user