alllow changing font weight for normal and bold text - fixes #3129, fixes #3400, fixes #5444, fixes #3045, fixes #6099

This commit is contained in:
Eugene Pankov
2022-04-15 18:47:55 +02:00
parent b330c428e6
commit 903b7d70f9
3 changed files with 52 additions and 6 deletions

View File

@@ -28,6 +28,30 @@ h3.mb-3(translate) Appearance
(ngModelChange)='config.save()', (ngModelChange)='config.save()',
) )
.form-line
.header
.title(translate) Normal font weight
input.form-control(
type='number',
min='100',
max='900',
step='100',
[(ngModel)]='config.store.terminal.fontWeight',
(ngModelChange)='config.save()'
)
.form-line
.header
.title(translate) Bold font weight
input.form-control(
type='number',
min='100',
max='900',
step='100',
[(ngModel)]='config.store.terminal.fontWeightBold',
(ngModelChange)='config.save()'
)
.col-12.col-md-6 .col-12.col-md-6
color-scheme-preview([scheme]='config.store.terminal.colorScheme', [fontPreview]='true') color-scheme-preview([scheme]='config.store.terminal.colorScheme', [fontPreview]='true')

View File

@@ -1,6 +1,7 @@
.preview( .preview(
[style.font-family]='getPreviewFontFamily()', [style.font-family]='getPreviewFontFamily()',
[style.font-size]='(fontPreview ? config.store.terminal.fontSize : 11) + "px"', [style.font-size]='(fontPreview ? config.store.terminal.fontSize : 11) + "px"',
[style.font-weight]='config.store.terminal.fontWeight',
[style.background-color]='scheme.background', [style.background-color]='scheme.background',
[style.color]='scheme.foreground', [style.color]='scheme.foreground',
[style.font-feature-settings]='\'"liga" \' + config.store.terminal.ligatures ? 1 : 0', [style.font-feature-settings]='\'"liga" \' + config.store.terminal.ligatures ? 1 : 0',
@@ -10,21 +11,38 @@
span([style.color]='scheme.colors[2]') john span([style.color]='scheme.colors[2]') john
span([style.color]='scheme.colors[6]') @ span([style.color]='scheme.colors[6]') @
span([style.color]='scheme.colors[4]') doe-pc span([style.color]='scheme.colors[4]') doe-pc
strong([style.color]='scheme.colors[1]') $ strong(
[style.color]='scheme.colors[1]',
[style.font-weight]='config.store.terminal.fontWeightBold'
) $
span ls span ls
span([style.background-color]='scheme.cursor')   span([style.background-color]='scheme.cursor')  
div div
span -rwxr-xr-x 1 root span -rwxr-xr-x 1 root
strong([style.color]='scheme.colors[3]') Documents strong(
[style.color]='scheme.colors[3]',
[style.font-weight]='config.store.terminal.fontWeightBold'
) Documents
div div
span -rwxr-xr-x 1 root  span -rwxr-xr-x 1 root 
strong([style.color]='scheme.colors[0]', [style.background]='scheme.colors[2]') Downloads strong(
[style.color]='scheme.colors[0]',
[style.background]='scheme.colors[2]',
[style.font-weight]='config.store.terminal.fontWeightBold'
) Downloads
div div
span -rwxr-xr-x 1 root  span -rwxr-xr-x 1 root 
strong([style.color]='scheme.colors[0]', [style.background]='scheme.colors[8]') Pictures strong(
[style.color]='scheme.colors[0]',
[style.background]='scheme.colors[8]',
[style.font-weight]='config.store.terminal.fontWeightBold'
) Pictures
div div
span -rwxr-xr-x 1 root span -rwxr-xr-x 1 root
strong([style.color]='scheme.colors[12]') Music strong(
[style.color]='scheme.colors[12]',
[style.font-weight]='config.store.terminal.fontWeightBold'
) Music
div(*ngIf='fontPreview') div(*ngIf='fontPreview')
span -rwxr-xr-x 1 root span -rwxr-xr-x 1 root
span([style.color]='scheme.colors[2]') 実行可能ファイル span([style.color]='scheme.colors[2]') 実行可能ファイル
@@ -35,7 +53,9 @@
span([style.color]='scheme.colors[1]') link span([style.color]='scheme.colors[1]') link
div(*ngIf='fontPreview') div(*ngIf='fontPreview')
span span
strong Icons: strong(
[style.font-weight]='config.store.terminal.fontWeightBold'
) Icons:
span    span   
span span
span   span  

View File

@@ -10,6 +10,8 @@ export class TerminalConfigProvider extends ConfigProvider {
terminal: { terminal: {
frontend: 'xterm', frontend: 'xterm',
fontSize: 14, fontSize: 14,
fontWeight: 400,
fontWeightBold: 700,
fallbackFont: null, fallbackFont: null,
linePadding: 0, linePadding: 0,
bell: 'off', bell: 'off',