@dxfom/mtext
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

DXF Object Model / MTEXT

A low level DXF MTEXT content parser.

Installation

$ npm i @dxfom/mtext

Usage

import { parseDxfMTextContent } from '@dxfom/mtext'

const content = parseDxfMTextContent(
  String.raw`\A1;\fAIGDT|b0|i0;\H2.5000;\ln\fArial|b0|i0;\H2.5000;68{\H1.3;\S+0,8^+0,1;}`
)
console.log(JSON.stringify(content, undefined, 4))

outputs:

[
   {
      "A": 1
   },
   {
      "f": "AIGDT",
      "b": 0,
      "i": 0
   },
   {
      "H": 2.5
   },
   {
      "L": 0
   },
   "n",
   {
      "f": "Arial",
      "b": 0,
      "i": 0
   },
   {
      "H": 2.5
   },
   "68",
   [
      {
         "H": 1.3
      },
      {
         "S": [
            "+0,8",
            "^",
            "+0,1"
         ]
      }
   ]
]

License

GPL 3.0

Readme

Keywords

Package Sidebar

Install

npm i @dxfom/mtext

Weekly Downloads

965

Version

0.4.0

License

GPL-3.0

Unpacked Size

49.7 kB

Total Files

8

Last publish

Collaborators

  • luncheon