Skip to content

layer.type.styles doesn't work #92

@jacr1102

Description

@jacr1102

I'm reading some PSDs and when i try to get the font I get this, instead of the color and family font, I get empty values

        psd.tree.descendant_layers.each do |l|
          next unless l.text
                      l.type.styles # {}
                     l.text # {
      :value => "www.websiteforge.com\n",
       :font => {
      :name => nil,
     :sizes => [],
    :colors => [
      [0] [
        [0] 0,
        [1] 0,
        [2] 0,
        [3] 255
      ]
    ],
       :css => "font-family: ;\nfont-size: pt;\ncolor: rgba(0, 0, 0, 255);"
  },
       :left => 0,
        :top => 0,
      :right => 0,
     :bottom => 0,
  :transform => {
    :xx => 1.0,
    :xy => 0.0,
    :yx => 0.0,
    :yy => 1.0,
    :tx => 84.0,
    :ty => 565.0
  }
}


        end

this is the sample psd https://www.dropbox.com/s/0bb8k8zgnqukpz2/textos.psd?dl=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions