Investigamer/Proxyshop

Bug: Typeline scaling fails for all commons which have the "multilayered" (list) structure symbols.json

Closed this issue · 3 comments

Describe the bug

Typeline scaling fails for all commons which have the "multilayered" (list) structure symbols.json

By "multilayered" structure I don't mean only the sets with actual multiple layers like MID. I'm also talking about single-layer sets like EXO which have their layers in symbols.json formatted as a list rather than a simple string.

By "failure" I don't actually mean that an error is produced. Instead, the scale_text_right_overlap() returns without doing anything, because reference is None. Resulting in a "silent failure" and thus an improperly scaled typeline.

This affects all templates.

Your system:

  • Python version: 3.8
  • Windows version: 11
  • Photoshop version: latest
  • Proxyshop version: 1.1.8

Screenshots

Thalakos Scout (Ancient John Matson)

The bug happens during the scale_text_right_overlap() function. It returns immediately because reference is None:

image

One level up in the call stack, we can see that reference is None here as well:

image

This bug only happens when rendering cards from sets which have the "multilayered" (list) structure in symbols.json:

image

Tip: To find cards on scryfall with long typelines (and common rarity) , you may use the search query

r:c t:/^.{30,}$/ -is:adventure -is:dfc -is:token language:english

where 30 is the minimum number of characters you want in the typeline.

I'm almost certain this has been fixed already, but if not, I know for certain it will be fixed with the release of 1.2.0 because Expansion Symbol is moving to template logic and will take place before text layers are generated, so the expansion layer passed will be complete and merged before its referenced during text formatting :)

Fixed as of 1.2.0 after expansion symbol was moved to template logic