@mlightcad/mtext-renderer 0.10.6 → 0.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,13 @@ export declare enum MTextFlowDirection {
37
37
  }
38
38
  /**
39
39
  * Anchor position used to align rendered MText relative to its insertion point.
40
+ *
41
+ * Values 1-9 mirror DXF MText attachment points (group code 71). Values
42
+ * 10-12 are extensions used for AutoCAD TEXT/ATTRIB entities whose vertical
43
+ * alignment is the typographic baseline (DXF group 73 = 0). The baseline
44
+ * sits slightly above the bbox bottom by the descender height; using
45
+ * `Bottom*` for these cases offsets the text by the descender (~10% of cap
46
+ * height for SHX fonts).
40
47
  */
41
48
  export declare enum MTextAttachmentPoint {
42
49
  /** Top-left corner. */
@@ -56,7 +63,13 @@ export declare enum MTextAttachmentPoint {
56
63
  /** Bottom-center point. */
57
64
  BottomCenter = 8,
58
65
  /** Bottom-right corner. */
59
- BottomRight = 9
66
+ BottomRight = 9,
67
+ /** Baseline-left point (for DXF TEXT/ATTRIB with valign=BASELINE). */
68
+ BaselineLeft = 10,
69
+ /** Baseline-center point. */
70
+ BaselineCenter = 11,
71
+ /** Baseline-right point. */
72
+ BaselineRight = 12
60
73
  }
61
74
  /**
62
75
  * Logical text token with optional pick box information.
@@ -20,7 +20,13 @@ export declare class UnifiedRenderer {
20
20
  */
21
21
  constructor(defaultMode?: RenderMode, workerConfig?: WebWorkerRendererConfig);
22
22
  /**
23
- * Sets one new style manager to override the default style manager
23
+ * Sets one new style manager to override the default style manager.
24
+ *
25
+ * Both renderers receive the override so that `syncRenderMText`
26
+ * (which always uses `mainThreadRenderer`) and `asyncRenderMText`
27
+ * (which may use either renderer) produce materials from the same
28
+ * manager.
29
+ *
24
30
  * @param value - New style manager
25
31
  */
26
32
  setStyleManager(value: StyleManager): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlightcad/mtext-renderer",
3
- "version": "0.10.6",
3
+ "version": "0.10.8",
4
4
  "description": "AutoCAD MText renderer based on Three.js",
5
5
  "license": "MIT",
6
6
  "author": "MLight Lee <mlight.lee@outlook.com>",