@@ -10,6 +10,7 @@ let successColor = '#4cd625'
1010let failureColor = '#dc3545'
1111let foldColor = 'lightgray'
1212let goodColor = 'black'
13+ let textFont = 'Helvetica Neue, Helvetica, Arial, sans-serif'
1314
1415const isLearnMode = ( ) => document . getElementById ( 'mode' ) . checked
1516const isAutomateMode = ( ) => ! document . getElementById ( 'mode' ) . checked
@@ -242,8 +243,8 @@ const focusOnProof = i => {
242243 let obj = canvas . item ( i )
243244 canvas . setActiveObject ( obj )
244245 let pt = obj . getPointByOrigin ( "center" , "center" )
245- canvas . absolutePan ( { x : pt . x - window . innerWidth / 2 , y : pt . y - window . innerHeight / 2 } )
246246 canvas . setZoom ( 1 )
247+ canvas . absolutePan ( { x : pt . x - window . innerWidth / 2 , y : pt . y - window . innerHeight / 2 } )
247248 canvas . renderAll ( )
248249}
249250
@@ -418,7 +419,7 @@ ProofTree.prototype.image = function (root) {
418419 if ( this . folded ) {
419420 premiseImages = this . premises . map ( p => {
420421 ellipses = new fabric . Text ( '...' , {
421- fontFamily : 'Helvetica' ,
422+ fontFamily : textFont ,
422423 fontSize : 30 ,
423424 stroke : 'black'
424425 } )
@@ -443,7 +444,7 @@ ProofTree.prototype.image = function (root) {
443444 let premiseGroup = this . premises ? new fabric . Group ( premiseImages , opt ) : new fabric . Group ( [ ] , opt )
444445
445446 let text = new fabric . Text ( this . conclusion . unicode ( ) , {
446- fontFamily : 'Helvetica' ,
447+ fontFamily : textFont ,
447448 fontSize : 30
448449 } )
449450 let newTextPt = ( new fabric . Point ( 0 , 30 ) ) . add ( premiseGroup . getPointByOrigin ( 'center' , 'bottom' ) )
@@ -506,7 +507,7 @@ ProofTree.prototype.image = function (root) {
506507 let foldLabel = null
507508 if ( isIncomplete ) {
508509 ruleLabel = new fabric . Text ( ' + ' , {
509- fontFamily : 'Helvetica' ,
510+ fontFamily : textFont ,
510511 fontSize : 11 ,
511512 stroke : 'white' ,
512513 hoverCursor : 'pointer' ,
@@ -677,21 +678,21 @@ ProofTree.prototype.image = function (root) {
677678 } )
678679 } else {
679680 ruleLabel = new fabric . Text ( this . unicodeName , {
680- fontFamily : 'Helvetica' ,
681+ fontFamily : textFont ,
681682 fontSize : 10 ,
682683 stroke : color
683684 } )
684685
685686 deleteLabel = new fabric . Text ( ' - ' , {
686- fontFamily : 'Helvetica' ,
687+ fontFamily : textFont ,
687688 fontSize : 11 ,
688689 stroke : 'white' ,
689690 hoverCursor : 'pointer' ,
690691 backgroundColor : failureColor
691692 } )
692693
693694 detachLabel = new fabric . Text ( '✄' , {
694- fontFamily : 'Helvetica' ,
695+ fontFamily : textFont ,
695696 fontSize : 11 ,
696697 stroke : 'white' ,
697698 hoverCursor : 'pointer' ,
@@ -724,7 +725,7 @@ ProofTree.prototype.image = function (root) {
724725 if ( this . premises . length > 0 ) {
725726 let n = "⃠"
726727 foldLabel = new fabric . Text ( n , {
727- fontFamily : 'Helvetica' ,
728+ fontFamily : textFont ,
728729 fontSize : 11 ,
729730 stroke : this . folded ? foldColor : 'black' ,
730731 hoverCursor : 'pointer' ,
0 commit comments