haganbmj / MagicSetEditor2

Magic Set Editor is a program for designing trading cards
Other
16 stars 7 forks source link

Alternative to `card_style.{text field}.content_height` from Magic Set Editor 2.0.0 #80

Open Eronan opened 1 month ago

Eronan commented 1 month ago

During the upgrade to Magic Set Editor 2.1.0, the ability to check the width and height of the text or paragraph was removed. Because previously it used card_style.field.content_height.

It would be a dynamic width/height that changed as more lines and characters were added to the text field.

Do we have an alternative to this in the current version? If not, would it be possible to add an alternative to this or re-allow the use of it?

Currently, trying to get the card_style.field.content_height will always return the allowable height of the field - 1.

This was mainly used for Bushiroad card games like Weiss Schwarz and Cardfight Vanguard. Old Issue from twanvl repository

haganbmj commented 3 weeks ago

hm, I think content_height is an exposed value - but I haven't at all looked into how it is calculated. If that's something that got (accidentally?) dumbed down back in 2.1 then maybe it's in the commit history somewhere.

The text rendering is MSE is also very... custom... so it wouldn't surprise me if it was inaccurate (especially with variant font faces like italics/bold).