webtoon / psd

Fast zero-dependency PSD parser for the web and Node.js
https://webtoon.github.io/psd
MIT License
1.21k stars 55 forks source link

Parse EngineData #6

Closed pastelmind closed 2 years ago

pastelmind commented 2 years ago

We got an internal request regarding the "EngineData" field of the Type Tool Object Setting structure, which encodes information about a text layer.

The Type Tool Object Setting structure is part of the Additional Layer Information record, inside the Layer and Mask Information Section of a PSD file.

PSD
  Layer and Mask Information
    Layer Info
      Layer Records
        Additional Layer Information
          Type Tool Object Setting
            text data (Descriptor classId == "TxLr")
              EngineData

The EngineData field is encoded in an undocumented format (nicknamed "EngineData format") invented by Adobe. While @webtoon/psd does not currently parse this segment, we may have to do so in the future, in order to support additional features related to text layers.

Prior work

Several PSD parsers can handle the EngineData format:

However, we MAY want to write a custom parser in TypeScript, in accordance with the Zero-Dependency design goal (see #5).

scoiatael commented 2 years ago

Hello,

I'm currently working at OpenDesign on PSD parsing. We'd love to use your library, but first, there are some features that are needed. This is one of them.

Would it be ok with you if I started implementing it or is there something I should know beforehand?

I can either create a new parser in TS, in Rust, or use the existing npmjs library - your call :)

dlehdanakf commented 2 years ago

Hello @scoiatael,

There is nothing you need to know beforehand.

If you post a pull request, we will actively review it. Thank you