Add letter spacing configuration option (#3002)

This commit is contained in:
Ricardo Amaral 2018-05-10 11:54:00 +01:00 committed by CHaBou
parent f72093c9d7
commit a14c55640c
6 changed files with 14 additions and 1 deletions

View file

@ -72,6 +72,7 @@ class TermGroup_ extends React.PureComponent {
fontWeight: this.props.fontWeight,
fontWeightBold: this.props.fontWeightBold,
lineHeight: this.props.lineHeight,
letterSpacing: this.props.letterSpacing,
modifierKeys: this.props.modifierKeys,
padding: this.props.padding,
url: session.url,

View file

@ -33,6 +33,7 @@ const getTermOptions = props => {
fontWeight: props.fontWeight,
fontWeightBold: props.fontWeightBold,
lineHeight: props.lineHeight,
letterSpacing: props.letterSpacing,
allowTransparency: needTransparency,
experimentalCharAtlas: 'dynamic',
theme: {
@ -267,7 +268,8 @@ export default class Term extends React.PureComponent {
if (
this.props.fontSize !== nextProps.fontSize ||
this.props.fontFamily !== nextProps.fontFamily ||
this.props.lineHeight !== nextProps.lineHeight
this.props.lineHeight !== nextProps.lineHeight ||
this.props.letterSpacing !== nextProps.letterSpacing
) {
// invalidate xterm cache about how wide each
// character is

View file

@ -102,6 +102,7 @@ export default class Terms extends React.Component {
fontWeight: this.props.fontWeight,
fontWeightBold: this.props.fontWeightBold,
lineHeight: this.props.lineHeight,
letterSpacing: this.props.letterSpacing,
padding: this.props.padding,
bell: this.props.bell,
bellSoundURL: this.props.bellSoundURL,