phetsims / scenery-phet

Reusable components based on Scenery that are specific to PhET simulations.
MIT License
8 stars 6 forks source link

PhetFont text bounds have changed on macOS #785

Open chrisklus opened 1 year ago

chrisklus commented 1 year ago

First reported in https://github.com/phetsims/joist/issues/645 - changes to the font-family of PhetFont have caused text to be positioned differently.

Here are two screenshots to compare (best to open in separate tabs):

before:

Number Play screenshot (3)

after:

Number Play screenshot (4)

In https://github.com/phetsims/joist/issues/645#issuecomment-1293951194, @kathy-phet asked:

Is it just the math symbols that are off center?

It is math symbols most noticeably, but numbers and regular text are a bit misaligned, too. The numbers in the total accordion boxes are a little low and are no longer vertically centered with the buttons. Also notice the comparison statement and sim title are a little lower than the original.

For this screen of Number Play, I think just the math symbols and total numbers are blocking, but given that general text is low too, I have to think there are plenty of pixel-perfect text alignments in many other sims that are now a little off in a noticeable way. Like text that is vertically aligned with a checkbox, for example, is going to look a little different. So i think ideally, the bounds should match what they were before for all cases.

Marking high priority and assigning to @kathy-phet and @jonathanolson.

kathy-phet commented 1 year ago

@jonathanolson - Is there a way to adjust this so its correct for this font family? Or is there something fundamental off here, and the team should look for a different font family? Please comment.

jonathanolson commented 1 year ago

It seems likely we may want to try another font family. Likely the font is slightly shorter than the bounds, and has non-vertically-centered math operators.

kathy-phet commented 1 year ago

Can you investigate and try some font families to find an improvement? I think its best to address this asap so we don't end up publishing sims that are using this font family for mac.

Question - is this font family specific to mac os?

kathy-phet commented 1 year ago

@jonathanolson @arouinfar @chrisklus @amanda-phet - I've read through the issue that motivated the font family change, and through the issues that the font family change caused (off center vertically, and issues with missing characters in other languages - my understanding is the original family didn't have those issues with the international languages.. is that right?).

In my opinion, the original design issue (slightly off center behavior on long strings) is less of a concern than these new concerns.

What do you think of restoring the original font family as the lesser of the problematic issues - at least for now?

kathy-phet commented 1 year ago

@jonathanolson - Looks like we have a consensus here from the designers. Can you revert the commit that changed the font family for macOS?

jonathanolson commented 1 year ago

Font reverted in the commit above.

jonathanolson commented 1 year ago

Couldn't test in number-play (NumberPlayGameLevelNode isn't specifying or allowing a tandem into the InfiniteStatusBar).

chrisklus commented 1 year ago

Thanks @jonathanolson! I tested in Number Compare and things are looking great. (InfiniteStatusBar should have a default tandem option soon.)

Should we close here or is there longer term work to do still?

pixelzoom commented 1 year ago

This issue has been in limbo for 8+ months, assigned to @kathy-phet. It's high priority and labeled as "blocks-sim-publication", guessing Number Compare. From the last comment, it looks like @chrisklus wanted @jonathanolson to close/comment but did not assign to him. I'll start by assigning to @chrisklus and @jonathanolson. Let's wrap this up.