Closed Nancy-Salpepi closed 1 year ago
@jonathanolson spoke about how used to be solved with a very slow algorithm, but the browser may have caught up with the API we want over in https://github.com/phetsims/scenery/issues/16, and so I'll see if something good comes out of that.
This might take 20 minutes or so to get working with the new APIs (but longer to test edge cases and really vet it). It also has wider (helpful) implications if this is implemented (Canvas optimizations are mostly not doable because we can't get accurate drawable bounds)
@Nancy-Salpepi can you please see if this is better on master? I could not reproduce the problem on iPad safari/chrome or on my windows machine, so I defer to your testing (thank you and sorry).
Things look good with mac + chrome now.....but not with safari. I think it is partly because of https://github.com/phetsims/scenery/issues/1458, but this is what locale=kn looks like now with safari:
and this is how it looks on chrome now:
Great thanks! And here I actually can reproduce this problem on my iPad, I'll give it a whirl.
That was my fault. The original issue was only in mac + chrome. Not with safari.
Scenery helper shows this in Chrome:
And this in Safari:
So we are seeing two problems:
@samreid problem one is documented in https://github.com/phetsims/scenery/issues/1458
@zepumph and I downloaded another kn font and saw that it looked different but still had the same bounds problem in Safari:
We found that this patch looks great in safari:
My expectation is that people using the kn locale hopefully have a font that renders the glyphs correctly. So I think this is mainly a problem for people who don't use the kn locale frequently. It's nice to see that some fonts do not have this problem. So perhaps this should not be a blocking problem at all. To follow up at lower priority, we could reach out to our kn trusted translator and ask about this issue?
I think we can move forward with cherry picking whatever comes out of https://github.com/phetsims/scenery/issues/16 as well as the commits in this repo.
I am not entirely sure which commits to cherry pick for this, and might need some help. I believe they are:
friction: https://github.com/phetsims/friction/commit/c687a8879a186cc7b63ed300ff0089195390c43c https://github.com/phetsims/friction/commit/9b48e0c064274739aff395cf90ffc5f0d272ae3a
scenery: https://github.com/phetsims/scenery/commit/9b39b08e639262fbdea6e952b681b848b3cf434f https://github.com/phetsims/scenery/commit/e11197c55b486c190e4dc790410f2f56f711a7df
But there is also a problem in https://github.com/phetsims/friction/issues/330#issuecomment-1412775307 that seems to still be in a patch?
Here is what it currently looks like on my Safari in master:
Here is what it looked like in RC.1
@samreid and I met to discuss the changes and agreed that it is best to move forward with the next RC without cherry-picking. We came to this conclusion because 1) The change in https://github.com/phetsims/scenery/commit/9b39b08e639262fbdea6e952b681b848b3cf434f uses a new web API. I am worried about platform specific problems and the "edge cases" mentioned in https://github.com/phetsims/friction/issues/330#issuecomment-1409417465. 2) The problem in https://github.com/phetsims/friction/issues/330#issue-1560402646 is minor, not worth time and destabilizing release branches. 3) This problem doesn't happen for me on Windows in 1.6-rc.1 or master. 4) The formatting in Safari actually seems worse in master compared to the release branch (see https://github.com/phetsims/friction/issues/330#issuecomment-1421574752) 5) @samreid found that the formatting was better with other kn fonts, so people actually using this language would presumably have a better font on their machines.
I'm going to close this issue, @Nancy-Salpepi just FYI about this decision for friction-1.6. But master is still improved since you pointed this out!
Test device MacBook Air (m1 chip)
Operating System 13.1
Browser chrome
Problem description For https://github.com/phetsims/qa/issues/886, with locale=kn the textbook titles dip below the books. Other locales reach the very bottom of the book, which I think is OK, but if not let me know and I will include that list.
Visuals
ex of text reaching bottom of book (locale=km)