phetsims / circuit-construction-kit-dc

"Circuit Construction Kit: DC" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
11 stars 8 forks source link

Increase the size of the switch's infinity symbol #135

Closed phet-steele closed 7 years ago

phet-steele commented 7 years ago

@samreid, I spoke with @arouinfar and we think it would be nice if the infinity symbol for the open switch value text was larger. There are two problems with the current implementation:

Increasing the size of the symbol would easily fix the first point. It would be nice, for the sake of the second point, if the size is made large enough such that the entire text has the same width as "0.0 Ω". Keeping the text for closed and open the same width would keep the text horizontally aligned when switching states, no?

For phetsims/QA#33.

samreid commented 7 years ago

@jonathanolson said RichText can change fonts within a single string.

It may fix the second problem (widths) to use "0 Ω" instead of "0.0 Ω".

I also asked @jonathanolson for his recommendations on this issue.

samreid commented 7 years ago

@jonathanolson said:

Font size of the infinity symbol on different platforms sounds problematic. Use a Path for it so it is consistent?

samreid commented 7 years ago

The current setup has the following advantages:

  1. It is internationalizable using the following string:
  "resistanceOhmsSymbol": {
    "value": "{{resistance}} Ω"
  },
  1. PhET-iO clients will be able to read this as a text value.
  2. The implementation is straightforward

Regarding the original reports:

The symbol is small and hard to see when the play area is zoomed out

Most (all?) of the readouts are small and hard to see when the play area is zoomed out. Why not increase the size for all of them? image

The difference in the text size between open/closed (closed displaying "0.0 Ω") causes a horizontal jump in the text (the vertical jump is understandable and fine as is).

What about using "0 Ω" instead of "0.0 Ω" for this case? Or would that be too inconsistent with other types of components?

arouinfar commented 7 years ago

@samreid "0 Ω" instead of "0.0 Ω" sounds good to me.

arouinfar commented 7 years ago

Most (all?) of the readouts are small and hard to see when the play area is zoomed out. Why not increase the size for all of them?

I think the infinity symbol looks disproportionately small, and increasing the size of other readouts would look too large at the regular zoom level.

samreid commented 7 years ago

In the above commit, the switch should show 0 Ω.

samreid commented 7 years ago

I tried changing the font for the entire readout, including the ohms symbol (just for switches). Here is regular zoom: image

and here is zoomed out: image

@arouinfar do you think something like that might work?

samreid commented 7 years ago

In the preceding change (not committed or pushed), the font is increased only for switches, and remains the same size for other components.

samreid commented 7 years ago

I decided to commit the change for increased Switch value font size, we can roll it back if we desire.

samreid commented 7 years ago

On second thought, this does look kind of odd:

image

Maybe I should try RichText (it could still be i18nizable)...

samreid commented 7 years ago

This is RichText with Century Gothic and a font size bump for the infinity symbol for the switch and Arial for the other one:

image

samreid commented 7 years ago

'Century Gothic' renders as century gothic, but 'Century Gothic, Arial' renders as arial. @jonathanolson can you help?

samreid commented 7 years ago

Proposed fix is http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.147/circuit-construction-kit-dc_en.html @arouinfar can you please test?

arouinfar commented 7 years ago

👍

arouinfar commented 7 years ago

While the switch looks ok, I realized while verifying #134 that this was effecting all components (thought it was just the switch).

I think the thinner numbers are actually a bit harder to read... image

arouinfar commented 7 years ago

I think these numbers are Century Gothic @samreid. Maybe your browser was showing the fallback?

samreid commented 7 years ago

Yep, it looks like @arouinfar is showing Century Gothic and my machine was showing some fallback.

samreid commented 7 years ago

I went back to Arial, then selected bold serif for the infinity symbol: http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.149/circuit-construction-kit-dc_en.html

@arouinfar and @phet-steele can you please test it out?

arouinfar commented 7 years ago

Much better @samreid! @phet-steele can you also take a look?

phet-steele commented 7 years ago

I like where this is at! Thanks for the suggestions and work, @arouinfar @samreid.