Files
OneCAD-Draft/src/entities/mod.rs
T
Karim Jerbi 627761b629 fix(text): render TTF glyphs as solid fills, fix font fallback, correct Z-order
Text elements previously rendered as hollow wireframe outlines and sometimes
fell back to the wrong system font due to case-sensitive exact matching. Also,
the viewport background grid drew on top of solid entities.

Case-insensitive and partial-name fallback matching (e.g., mapping "arialn"
to "Arial Narrow") is now added to `sysfont::canonical_family_name`, ensuring
text resolves to the correct installed system font.

TrueType font contours are now triangulated into solid fills (`fill_tris`)
using `lyon_tessellation` in `ttf_glyph.rs`. To prevent the GPU from misclassifying
this 2D text as a 3D mesh (which broke flat shading), text tessellation splits
the output into separate outline and fill `WireModel`s.

The background grid is extracted from `SelectionCanvas` into `GridCanvas` and
moved beneath the 3D viewport to ensure proper layering. Finally, `DepthBiasState`
is enabled on all face/fill pipelines to apply a polygon offset, perfectly
resolving Z-fighting between coplanar wireframe lines and solid faces.
2026-06-25 18:17:01 +01:00

33 lines
533 B
Rust

pub mod arc;
pub mod attribute;
pub mod circle;
pub mod common;
pub mod dimension;
pub mod ellipse;
pub mod hatch;
pub mod insert;
pub mod leader;
pub mod line;
pub mod lwpolyline;
pub mod mesh;
pub mod mline;
pub mod mtext;
pub mod multileader;
pub mod names;
pub mod ole2frame;
pub mod point;
pub mod polyline;
pub mod raster_image;
pub mod ray;
pub mod shape;
pub mod solid;
pub mod solid3d;
pub mod spline;
pub mod table;
pub mod text;
pub mod text_support;
pub mod tolerance;
pub mod traits;
pub mod underlay;
pub mod viewport;