Xterm.js: setOption fontSize and fontWeight changes fontFamily

Created on 7 Jun 2018  路  2Comments  路  Source: xtermjs/xterm.js

It seems there is something not working while using setOption fontSize and fontWeight which changes fontFamily

Details

  • Browser and browser version: chrome:"61.0.3163.100" / Electron
  • OS version: Windows 10
  • xterm.js version: 3.4.1

Steps to reproduce

Initialize xterm.js using setOption

  1. self.xterm.setOption('theme', theme)
    Change font settings
  2. xterm.setOption('fontSize', theme.fontSize || '10px')
  3. xterm.setOption('fontWeight', theme.fontWeight || 'normal')
typquestion

All 2 comments

Looks like this is happening because you're using '10px' the string for fontSize, you should use 10 the number as per:

https://github.com/xtermjs/xterm.js/blob/ddc94669169714bdd3b5468c5f3dd69ff5955d13/typings/xterm.d.ts#L623

Thank you very much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kolbe picture kolbe  路  3Comments

johnpoth picture johnpoth  路  3Comments

parisk picture parisk  路  3Comments

travisobregon picture travisobregon  路  3Comments

Tyriar picture Tyriar  路  4Comments