bushvin / actor-export

A Foundry VTT module to export actors
GNU General Public License v3.0
5 stars 1 forks source link

[Bug]: 5e "CharacterDetails" is scrambled. #8

Closed BDimi closed 3 months ago

BDimi commented 3 months ago

Contact Details

No response

Foundry VTT version

11.315

Game system

dnd5e

Game system version

3.1.2

actor-export module version

2024.4.6

What browsers are you seeing the problem on?

No response

What Provider is affected?

Dungeons & Dragons 5th edition Character sheets

What happened?

When exporting all "D&D 5e Character Sheet", "D&D 5e Character Details Sheet", & "D&D 5e Character Spellcasting Sheet", the details sheet ends up with scrambled text on the page. The words all seem to go in the correct spots, but it looks like they've been hit with ROT13 or something.

Relevant log output

No response

Sample Actor

No response

Attachments

No response

bushvin commented 3 months ago

That is weird, this happened to me once as well, but I could not reproduce it. After completely reloading it didn't happen again.

Would you mind telling me more about your setup?

What pdf viewer do you use, which version?

What browser are you using, which version?

What os are you running, which version?

bushvin commented 3 months ago

also, would you mind sharing an export of your character, and possibly the resulting PDF?

BDimi commented 3 months ago

fvtt-Actor-demo-player-FW8KpUvniufCDeFZ.json Demo Player - CharacterSheet.pdf Demo Player - CharacterDetails.pdf

I reproduced the problem with 6 different characters and then rolled this new one with SRD data. If I only select Details, then the sheet comes out correctly.

bushvin commented 3 months ago

@BDimi I think I discovered why this happens, but I'm not 100% sure, as I cannot reliably reproduce the problem.

Could you please confirm if release 2024.5.1 fixes the issue?

BDimi commented 3 months ago

No, same result. image

bushvin commented 3 months ago

Drat... Double drat...

Could you also provide the feedback from your browser console?

Developer tools >> console

BDimi commented 3 months ago

I think this is the relevant content: image

bushvin commented 3 months ago

It is indeed the relevant section.

How many pdfs did you try to export in this case? The reason I ask is because the errors do not show the entire path export...f

If you could copy the paths, that would be awesome.

BDimi commented 3 months ago

Three PDF's: basic, details, spellcasting. First URL: http://localhost:30000/modules/actor-export/providers/dnd5e/fonts/MarkerFelt.ttf?t=1714668792709 Second: http://localhost:30000/modules/actor-export/providers/dnd5e/fonts/MarkerFelt.ttf?t=1714668792724

bushvin commented 3 months ago

That is the problem. You exported 3 pdfs, you should have had 3 errors.

The reason you get the error is because it looks for the specified font in 2 directories, prioritising the one closest to the provider.

Let me investigate further.

bushvin commented 3 months ago

I think now I got to the bottom of it. One of my objects to control the embedding of the text was not properly deep cloned.

Can you retry with 2024.5.2?

BDimi commented 3 months ago

Yeah, that did it! Thanks!