mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-18 14:04:17 +08:00
ligatures switch (fixes #51)
This commit is contained in:
parent
7327a7008c
commit
48e8ffd729
@ -1,3 +1,4 @@
|
||||
const dataurl = require('dataurl')
|
||||
import { BehaviorSubject, Subject, Subscription } from 'rxjs'
|
||||
import 'rxjs/add/operator/bufferTime'
|
||||
import { Component, NgZone, Inject, Optional, ViewChild, HostBinding, Input } from '@angular/core'
|
||||
@ -261,6 +262,28 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
preferenceManager.set('cursor-color', config.terminal.colorScheme.cursor)
|
||||
}
|
||||
|
||||
let css = require('../hterm.userCSS.scss')
|
||||
if (!config.terminal.ligatures) {
|
||||
css += `
|
||||
* {
|
||||
font-feature-settings: "liga" 0;
|
||||
font-variant-ligatures: none;
|
||||
}
|
||||
`
|
||||
} else {
|
||||
css += `
|
||||
* {
|
||||
font-feature-settings: "liga" 1;
|
||||
font-variant-ligatures: initial;
|
||||
}
|
||||
`
|
||||
}
|
||||
preferenceManager.set('user-css', dataurl.convert({
|
||||
data: css,
|
||||
mimetype: 'text/css',
|
||||
charset: 'utf8',
|
||||
}))
|
||||
|
||||
this.hterm.setBracketedPaste(config.terminal.bracketedPaste)
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
||||
bell: 'off',
|
||||
bracketedPaste: false,
|
||||
background: 'theme',
|
||||
ligatures: false,
|
||||
colorScheme: {
|
||||
__nonStructural: true,
|
||||
name: 'Material',
|
||||
|
@ -1,4 +1,3 @@
|
||||
const dataurl = require('dataurl')
|
||||
export const hterm = require('hterm-umdjs')
|
||||
hterm.hterm.defaultStorage = new hterm.lib.Storage.Memory()
|
||||
export const preferenceManager = new hterm.hterm.PreferenceManager('default')
|
||||
@ -16,11 +15,6 @@ hterm.hterm.VT.ESC['k'] = function (parseState) {
|
||||
parseState.func = parseOSC
|
||||
}
|
||||
|
||||
preferenceManager.set('user-css', dataurl.convert({
|
||||
data: require('./hterm.userCSS.scss'),
|
||||
mimetype: 'text/css',
|
||||
charset: 'utf8',
|
||||
}))
|
||||
preferenceManager.set('background-color', '#1D272D')
|
||||
preferenceManager.set('color-palette-overrides', {
|
||||
0: '#1D272D',
|
||||
|
@ -6,10 +6,6 @@ a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
* {
|
||||
font-feature-settings: "liga" 0; // disable ligatures (they break monospacing)
|
||||
}
|
||||
|
||||
x-screen {
|
||||
transition: 0.125s ease background;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user