From 3db452ea5c2daae9c6041c0906c1c70ac6f15885 Mon Sep 17 00:00:00 2001 From: samreid Date: Thu, 13 Dec 2018 17:55:29 -0700 Subject: [PATCH] Specify Ludica Console, a monospace font, so the numbers don't jump, see https://github.com/phetsims/wave-interference/issues/239 --- js/TimerReadoutNode.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/js/TimerReadoutNode.js b/js/TimerReadoutNode.js index 15b17e8f4..35c4fd03a 100644 --- a/js/TimerReadoutNode.js +++ b/js/TimerReadoutNode.js @@ -17,8 +17,18 @@ define( require => { const Util = require( 'DOT/Util' ); // constants - const DEFAULT_LARGE_FONT = new PhetFont( 20 ); - const DEFAULT_SMALL_FONT = new PhetFont( 15 ); + + // Try for a monospace font so that the numbers don't change alignment. Fallback to Arial as determined in + // https://github.com/phetsims/wave-interference/issues/239 + const FONT_FAMILY = '"Lucida Console", Arial'; + const DEFAULT_LARGE_FONT = new PhetFont( { + size: 20, + family: FONT_FAMILY + } ); + const DEFAULT_SMALL_FONT = new PhetFont( { + size: 15, + family: FONT_FAMILY + } ); class TimerReadoutNode extends Rectangle {