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

    0.3.2 • 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

    Keywords

    Install

    npm i @dxfom/mtext

    DownloadsWeekly Downloads

    7

    Version

    0.3.2

    License

    GPL-3.0

    Unpacked Size

    45.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar