Skip to content

Copy-paste not working for rendered glyphs #17

Open

Description

@diegomura

As explained here #15, copy pasting text from documents created with the TextRendeder is not working. Devon pointed out the cause of the issue, but it will require q bit more research from my side to solve it

Activity

  1. diegomura commented on Mar 29, 2018

    @diegomura
    CollaboratorAuthor

    Seems to me that this can be solved by passing by glyphs with the correct codePoints field to pdfkit _addGlyphs. However, the fontkit string-indices branch erases this field from Glyph.

    @devongovett why did you do that? If present, we can use codePoints to fill in unicode values on pdfkit side and solve this issue, right?

  2. diegomura commented on Apr 16, 2018

    @diegomura
    CollaboratorAuthor

    @devongovett sorry for bothering you! But I'm stuck in here. How can I do to access a glyph codePoints now that it's not part of Glyph attributes anymore? I need this data to fix copy-pasting on pdfkit and encode glyphs for standard fonts. Thanks in advance!

  3. devongovett commented on Apr 26, 2018

    @devongovett
    Member

    You'd need the original string that the glyphs were constructed with, and the string indexes of the glyphs. Then you can just slice the string to get the code points.

  4. diegomura commented on Apr 26, 2018

    @diegomura
    CollaboratorAuthor

    Thanks for your answer!
    So you suggest to pass codePoints to the _addGlyphs method?

  5. devongovett commented on Apr 26, 2018

    @devongovett
    Member

    yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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