provide a fallback monospace font for characters missing in user's font (fixes #112)

This commit is contained in:
Eugene Pankov
2017-07-15 18:15:49 +02:00
parent 23c7acde51
commit 4ba7cf106f
6 changed files with 141 additions and 5 deletions

View File

@@ -155,6 +155,8 @@ export class TerminalTabComponent extends BaseTabComponent {
hterm.primaryScreen_.syncSelectionCaret = () => null
hterm.alternateScreen_.syncSelectionCaret = () => null
hterm.primaryScreen_.terminal = hterm
hterm.alternateScreen_.terminal = hterm
const _onPaste = hterm.scrollPort_.onPaste_.bind(hterm.scrollPort_)
hterm.scrollPort_.onPaste_ = (event) => {
@@ -244,7 +246,7 @@ export class TerminalTabComponent extends BaseTabComponent {
async configure (): Promise<void> {
let config = this.config.store
preferenceManager.set('font-family', config.terminal.font)
preferenceManager.set('font-family', `"${config.terminal.font}", "monospace-fallback", monospace`)
this.setFontSize()
preferenceManager.set('enable-bold', true)
preferenceManager.set('audible-bell-sound', '')

Binary file not shown.

View File

@@ -9,3 +9,9 @@ a:hover {
x-screen {
transition: 0.125s ease background;
}
@font-face {
font-family: "monospace-fallback";
src: url(fonts/Meslo.otf) format("opentype"),
url(fonts/UbuntuMono.woff2) format("woff2");
}