This repository was archived by the owner on Jan 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,7 @@ export class Editor {
362362 this . localTheme = ''
363363
364364 this . theme = theme
365+ this . _setThemeFontFamily ( )
365366 this . penStyle = penStyle
366367 this . penStyleClasses = ''
367368
@@ -551,6 +552,7 @@ export class Editor {
551552 this . innerRecognizer . close ( this . recognizerContext , this . model )
552553 . then ( ( model ) => {
553554 logger . info ( 'Recognizer closed' )
555+ this . _setThemeFontFamily ( )
554556 initialize ( InkModel . clearModel ( model ) , true )
555557 handleSuccess ( this , model )
556558 } )
@@ -977,6 +979,15 @@ export class Editor {
977979 return null
978980 }
979981
982+ /**
983+ * Apply the font-family on theem corresponding to chosen language
984+ * @private
985+ */
986+ _setThemeFontFamily ( ) {
987+ const defaultLang = ! Object . keys ( Constants . Languages ) . includes ( this . configuration . recognitionParams . iink . lang )
988+ this . theme [ '.text' ] [ 'font-family' ] = defaultLang ? Constants . Languages . default : Constants . Languages [ this . configuration . recognitionParams . iink . lang ]
989+ }
990+
980991 /**
981992 * Trigger the change callbacks (and by default send a change event).
982993 */
You can’t perform that action at this time.
0 commit comments