grokkingbitcoin icon indicating copy to clipboard operation
grokkingbitcoin copied to clipboard

Multiple annotations mixed in text objects

Open kallerosenbaum opened this issue 3 years ago • 18 comments

Most annotations are mixed up with each other, so a text object can contain text from multiple annotations, making them harder to work with. For example image 10-12 contains among others the following text object when opened in Inkscape 1.0.2:

in the table.Verify the checksum,and interpret the witnessprogram as 5-bit numbers.Witness programRearrange in bytes (8 bits).Witness programExtract the witness version.Human-readable part.“bc” means bitcoin.“

These texts belong to several different annotations. I'm not sure how to fix this issue. It's darn annoying and cumbersome to work with.

It might be easier to follow this in Adobe Illustrator but I can't check that since I don't have a license for it.

kallerosenbaum avatar May 19 '21 17:05 kallerosenbaum

@vherming how did the annotations appear in Adobe Illustrator? Were they nicely editable, with each annotation as a separate text object, or were several annotations mixed in the same text objects?

kallerosenbaum avatar May 20 '21 09:05 kallerosenbaum

Not sure what you mean by annotations. Do you have an example, possibly with a screendump for visual reference?

On 2021-05-20, at 11:46, Kalle Rosenbaum @.***> wrote:

@vherming https://github.com/vherming how did the annotations appear in Adobe Illustrator? Were they nicely editable, with each annotation as a separate text object, or were several annotations mixed in the same text objects?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kallerosenbaum/grokkingbitcoin/issues/22#issuecomment-844925142, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRTXLEMM6JF3KXZCEBIR3TOTK6DANCNFSM45FESUCA.

vherming avatar May 20 '21 09:05 vherming

@vherming Annotations are the little pieces of text, usually with an arrow pointing to some object in the image. In this screenshot, Parts of three annotations are part of the same text object: Segwit address, ” is a delimiter., and Witness version.

image

This is not so nice to work with in Inkscape, and I'm wondering if this appears differently in Adobe Illustrator?

kallerosenbaum avatar May 20 '21 11:05 kallerosenbaum

Oh, those were all editable in-place, in-line, as you would expect. In fact, I didn't find anything hindering the workflow in Illustrator, at least as long as AI files were used. [EPS was occasionally problematic, and SVG was the worst (as discussed earlier, this might well be due to my old Illustrator version)]

On 20. May 2021, at 13:05, Kalle Rosenbaum @.***> wrote:

 @vherming Annotations are the little pieces of text, usually with an arrow pointing to some object in the image. In this screenshot, Parts of three annotations are part of the same text object: Segwit address, ” is a delimiter., and Witness version.

This is not so nice to work with in Inkscape, and I'm wondering if this appears differently in Adobe Illustrator?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

vherming avatar May 20 '21 11:05 vherming

Damn, that's what I feared. It means there is at least one argument to keep .ai format. Thanks for your input.

kallerosenbaum avatar May 20 '21 11:05 kallerosenbaum

I suggest you get a free trial period from Adobe and test out the current state of their mad SVG skillz. If they've improved, you can scrap AI files and go with SVG.

On 20. May 2021, at 13:30, Kalle Rosenbaum @.***> wrote:

 Damn, that's what I feared. It means there is at least one argument to keep .ai format. Thanks for your input.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

vherming avatar May 20 '21 11:05 vherming

free trial period from Adobe

Probably right thing to do, but I only have linux machines at home and I'm lazy. I'll ask a friend.

kallerosenbaum avatar May 20 '21 12:05 kallerosenbaum

Asked a friend. He opened the .ai file in the latest Adobe Illustrator available at 2021-05-20 and exported as .svg. When I opened the exported .svg in Inkscape, the issue described here has disappeared. One key thing we noticed is that he must have the font installed when exporting, otherwise the texts will not look ok in the exported file and the issue is still there.

Takeaway;

  • Export from .ai to .svg in Adobe Illustrator produces good result if the fonts are installed.
  • Export from .ai to .svg in Inkscape producdes good looking result, but we get the issue discussed here
  • Adobe illustrator export seems to produce ~50% smaller svg files than Inkscape export

kallerosenbaum avatar May 20 '21 14:05 kallerosenbaum

Wow, good news, thanks

On 20. May 2021, at 16:03, Kalle Rosenbaum @.***> wrote:

 Asked a friend. He opened the .ai file in the latest Adobe Illustrator available at 2021-05-20 and exported as .svg. When I opened the exported .svg in Inkscape, the issue described here has disappeared. One key thing we noticed is that he must have the font installed when exporting, otherwise the texts will not look ok in the exported file and the issue is still there.

Takeaway;

Export from .ai to .svg in Adobe Illustrator produces good result if the fonts are installed. Export from .ai to .svg in Inkscape producdes good looking result, but we get the issue discussed here Adobe illustrator export seems to produce ~50% smaller svg files than Inkscape export — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

vherming avatar May 20 '21 14:05 vherming

For reference I attach

  • 10-12.ai - The original Illustrator file
  • 10-12-inkscape.svg - exported from .ai by Inkscape. This issue appears.
  • 10-12-illustrator-missingfont.svg - exported from .ai by Illustrator, but font Humanst521 Cn BT missing. This issue appears.
  • 10-12-illustrator-good-svg - exported from .ai by Illustrator, with good result. This issue does not appear. 10-12-exports.tar.gz

kallerosenbaum avatar May 20 '21 15:05 kallerosenbaum

So the question now is, should we get someone with an Illustrator license to export all files through a script or something? This would probably save us a lot of manual and error-prone work.

kallerosenbaum avatar May 20 '21 15:05 kallerosenbaum

It's relatively easy to create a macro in Illustrator that does the exporting. Ask your friend again....?

On 20. May 2021, at 17:13, Kalle Rosenbaum @.***> wrote:

 So the question now is, should we get someone with an Illustrator license to export all files through a script or something? This would probably save us a lot of manual and error-prone work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

vherming avatar May 20 '21 15:05 vherming

Yes, will do. @omnifinn I think I need to redo the conversion from .ai to .svg. And i do think that it might save you time and headache if you let me fix this before you move too far ahead with your translations. What do you think?

kallerosenbaum avatar May 20 '21 18:05 kallerosenbaum

Yes, of course. I will put the work on hold until you are done.

niko

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, May 20, 2021 9:23 PM, Kalle Rosenbaum @.***> wrote:

Yes, will do. @.***(https://github.com/omnifinn) I think I need to redo the conversion from .ai to .svg. And i do think that it might save you time and headache if you let me fix this before you move too far ahead with your translations. What do you think?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

omnifinn avatar May 20 '21 19:05 omnifinn

Cool. Will have it done at latest on Monday.

kallerosenbaum avatar May 21 '21 12:05 kallerosenbaum

Ok, this is now done on branch illustratorconv https://github.com/kallerosenbaum/grokkingbitcoin/tree/illustratorconv . @omnifinn please check that branch out and see if you can work with it. Inkscape spews out a lot of errors of the following two types, both when opening the images and when building with make:

SPIPaint::read: No valid object or document!
** (org.inkscape.Inkscape:1770351): WARNING **: 20:07:45.008: attribute 'clip-path' given as CSS

It seems they can be safely ignored. I might find a nice way to suppress those two specific warnings, but until then we'll have to live with them.

kallerosenbaum avatar May 24 '21 18:05 kallerosenbaum

I haven't fixed the German version, though I have got the converted svg images from my friend. I will put less effort into those, because other translations don't depend on them.

kallerosenbaum avatar May 24 '21 19:05 kallerosenbaum

Thanks! I will check it out.

Best: Niko Laamanen https://konsensus.network https://t.me/omnifinn

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Monday, May 24, 2021 9:57 PM, Kalle Rosenbaum @.***> wrote:

Ok, this is now done on branch illustratorconv https://github.com/kallerosenbaum/grokkingbitcoin/tree/illustratorconv . @.***(https://github.com/omnifinn) please check that branch out and see if you can work with it. Inkscape spews out a lot of errors of the following two types, both when opening the images and when building with make:

SPIPaint::read: No valid object or document! ** (org.inkscape.Inkscape:1770351): WARNING **: 20:07:45.008: attribute 'clip-path' given as CSS

It seems they can be safely ignored. I might find a nice way to suppress those two specific warnings, but until then we'll have to live with them.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

omnifinn avatar May 25 '21 12:05 omnifinn