You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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?
@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!
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.
Activity
diegomura commentedon Mar 29, 2018
Seems to me that this can be solved by passing by glyphs with the correct
codePointsfield to pdfkit_addGlyphs. However, thefontkitstring-indices branch erases this field from Glyph.@devongovett why did you do that? If present, we can use
codePointsto fill in unicode values on pdfkit side and solve this issue, right?diegomura commentedon Apr 16, 2018
@devongovett sorry for bothering you! But I'm stuck in here. How can I do to access a glyph
codePointsnow 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!devongovett commentedon Apr 26, 2018
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.
diegomura commentedon Apr 26, 2018
Thanks for your answer!
So you suggest to pass
codePointsto the_addGlyphsmethod?devongovett commentedon Apr 26, 2018
yep