Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non English character in text layer #56

Closed
BBQ opened this issue Dec 31, 2013 · 2 comments
Closed

Non English character in text layer #56

BBQ opened this issue Dec 31, 2013 · 2 comments

Comments

@BBQ
Copy link

BBQ commented Dec 31, 2013

I'v got strange sequence of symbols while parsing text value of psd text layer with russian language. For example word "Контакты" is represented as "\u0004\u001A\u0004>\u0004=\u0004B\u00040\u0004:\u0004B\u0004K\n"
It seems like this is encoding problem because the code of letter K should be "041A" and here we have "\u0004\u001A" I was digging PSD.TypeTool.parse and PSD.File.read_unicode_string but can`t get it work.

@drakmail
Copy link

drakmail commented Jul 7, 2015

At this moment it works like a charm (part of psd.tree.to_hash.to_yaml):

  - :type: :layer
    :visible: true
    :opacity: 1.0
    :blending_mode: normal
    :layer_comps: {}
    :name: "Контакты"
    :left: 507
    :right: 663
    :top: 4857
    :bottom: 4884
    :height: 27
    :width: 156
    :text:
      :value: "Контакты"
      :font:
        :name: PTSans-Bold
        :fonts:
        - PTSans-Bold
        - MyriadPro-Regular
        - AdobeInvisFont
        :sizes:
        - 38.0
        :colors:
        - - 28
          - 40
          - 54
          - 255
        :alignment:
        - center
        :leadings:
        - 39.0
        :css: |-
          font-family: PTSans-Bold, MyriadPro-Regular, AdobeInvisFont;
          font-size: 38.0pt;
          color: rgba(28, 40, 54, 255);
          text-align: center;

@meltingice
Copy link
Member

Thanks for the update @drakmail. If I remember correctly, there have been some fixes/improvements to character encoding handling since the issue was created. Going to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants