forked from 1b-agent/opencadstudio-upstream
fix(block-cache): address PR211 review follow-ups
- expand_defn: dedup the <1px baseline LOD branch the same way the <5px greek branch does, so colour-split MTEXT no longer stacks N overlapping baselines (one per \C segment) over the same OBB. - sysfont: memoise canonical_family_name process-wide. resolve_font calls it once per word on the MTEXT measure hot path and Face::resolve re-runs it right after; the fontdb query + linear family scans were uncached. - dimension/multileader/table: reword the 6 fill_tris_low FIXMEs. They cited a stale line and the wrong consumer — these fills render on the top-level path (panic-safe .get().unwrap_or), not the block cache, so they cannot trip emit_wire's debug_assert. State the real status: latent f32-precision debt, not a crash. Also fix the mis-indented text-fill WireModel in dimension.rs. - tests: add a host-independent colour-split test (two \C segments in a block keep ≥2 distinct wire colours — guards the per-wire colour fix) and a TTF-gated UTM fill test (paired, non-zero fill_tris_low). Note the arial-style test's LFF-fallback limitation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
a84da122f4
commit
a93271c1bd
6 files changed
+174
-31
No files matched your search
Vendored
+11
-1
@@ -1138,6 +1138,17 @@ fn expand_defn(
|
||||
}
|
||||
} else {
|
||||
if h_px < 1.0 {
|
||||
// Colour-split MTEXT: only the first outline
|
||||
// wire from a source entity emits the baseline
|
||||
// substitute. Siblings share the same
|
||||
// text_obb_local and would stack identical
|
||||
// overlapping lines (last colour wins) — the
|
||||
// same dedup the greek branch does, one tier
|
||||
// down.
|
||||
if lw.text_obb_local == last_lod_obb {
|
||||
continue;
|
||||
}
|
||||
last_lod_obb = lw.text_obb_local;
|
||||
emit_text_baseline(lw, accum_xform, ctx, out, wpp);
|
||||
continue;
|
||||
}
|
||||
@@ -1431,7 +1442,6 @@ fn emit_wire(
|
||||
entry.fill_tris.push([hx, hy, hz]);
|
||||
entry.fill_tris_low.push([lx, ly, lz]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn transform_tangent(
|
||||
|
||||
Reference in new issue
Block a user