Skip to content

Commit a6dd95b

Browse files
committed
font weight
1 parent 7bf7422 commit a6dd95b

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
},
2727
"license": "GPL-3.0-or-later",
2828
"devDependencies": {
29-
"@antfu/eslint-config": "^6.0.0",
30-
"@parcel/transformer-sass": "^2.16.0",
31-
"@playwright/test": "^1.56.1",
32-
"@types/node": "^24.9.1",
29+
"@antfu/eslint-config": "^6.2.0",
30+
"@parcel/transformer-sass": "^2.16.1",
31+
"@playwright/test": "^1.57.0",
32+
"@types/node": "^24.10.1",
3333
"emoji-regex": "^10.6.0",
34-
"eslint": "^9.38.0",
34+
"eslint": "^9.39.1",
3535
"eslint-plugin-format": "^1.0.2",
36-
"parcel": "^2.16.0",
37-
"stylelint": "^16.25.0",
36+
"parcel": "^2.16.1",
37+
"stylelint": "^16.26.1",
3838
"stylelint-config-standard-scss": "^16.0.0",
3939
"typescript": "^5.9.3"
4040
}

page/common.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,21 +411,25 @@ $color-transition: var(--color-transition, background-color 500ms ease, color 50
411411
.fcitx-text {
412412
font-family: var(--text-font-family);
413413
font-size: $text-font-size;
414+
font-weight: var(--text-font-weight);
414415
}
415416

416417
.fcitx-label {
417418
font-family: var(--label-font-family);
418419
font-size: $label-font-size;
420+
font-weight: var(--label-font-weight);
419421
}
420422

421423
.fcitx-comment {
422424
font-family: var(--comment-font-family);
423425
font-size: $comment-font-size;
426+
font-weight: var(--comment-font-weight);
424427
}
425428

426429
.fcitx-preedit {
427430
font-family: var(--preedit-font-family);
428431
font-size: $preedit-font-size;
432+
font-weight: var(--preedit-font-weight);
429433
line-height: $preedit-font-size;
430434
}
431435

page/customize.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,19 @@ export function setStyle(style: string) {
197197
// Font
198198
setFontFamily('--text-font-family', j.Font.TextFontFamily)
199199
theme.style.setProperty('--text-font-size', px(j.Font.TextFontSize))
200+
theme.style.setProperty('--text-font-weight', j.Font.TextFontWeight)
200201

201202
setFontFamily('--label-font-family', j.Font.LabelFontFamily)
202203
theme.style.setProperty('--label-font-size', px(j.Font.LabelFontSize))
204+
theme.style.setProperty('--label-font-weight', j.Font.LabelFontWeight)
203205

204206
setFontFamily('--comment-font-family', j.Font.CommentFontFamily)
205207
theme.style.setProperty('--comment-font-size', px(j.Font.CommentFontSize))
208+
theme.style.setProperty('--comment-font-weight', j.Font.CommentFontWeight)
206209

207210
setFontFamily('--preedit-font-family', j.Font.PreeditFontFamily)
208211
theme.style.setProperty('--preedit-font-size', px(j.Font.PreeditFontSize))
212+
theme.style.setProperty('--preedit-font-weight', j.Font.PreeditFontWeight)
209213

210214
// Caret
211215
setBlink(j.Caret.Style === 'Blink')

page/global.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,16 @@ declare global {
5757
Font: {
5858
TextFontFamily: FONT_FAMILY
5959
TextFontSize: string
60+
TextFontWeight: string
6061
LabelFontFamily: FONT_FAMILY
6162
LabelFontSize: string
63+
LabelFontWeight: string
6264
CommentFontFamily: FONT_FAMILY
6365
CommentFontSize: string
66+
CommentFontWeight: string
6467
PreeditFontFamily: FONT_FAMILY
6568
PreeditFontSize: string
69+
PreeditFontWeight: string
6670
}
6771
Caret: {
6872
Style: 'Blink' | 'Static' | 'Text'

tests/util.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,22 @@ const defaultStyle: STYLE_JSON = {
126126
0: '',
127127
},
128128
CommentFontSize: '12',
129+
CommentFontWeight: '400',
129130
LabelFontFamily: {
130131
0: '',
131132
},
132133
LabelFontSize: '12',
134+
LabelFontWeight: '400',
133135
PreeditFontFamily: {
134136
0: '',
135137
},
136138
PreeditFontSize: '16',
139+
PreeditFontWeight: '400',
137140
TextFontFamily: {
138141
0: '',
139142
},
140143
TextFontSize: '16',
144+
TextFontWeight: '400',
141145
},
142146
Highlight: {
143147
HoverBehavior: 'None',

0 commit comments

Comments
 (0)