Skip to content

Commit ca74195

Browse files
committed
Fix: restore OpenType ligatures broken by letter-spacing
1 parent e77bf32 commit ca74195

File tree

9 files changed

+33
-17
lines changed

9 files changed

+33
-17
lines changed

npm/dist/assets/blog-index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/dist/assets/blog-scaffold.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/dist/blog-scaffold.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/src/component/dialog/AboutMeDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class AboutMeDialog extends BasicDialog<BasicDialogProps, any> {
4343
<Button text="Git" onClick={null} className="btn-tag" />
4444
</section>
4545
<p className="about-me-description">九五后,旅居杭州,<a
46-
href={this.getKunQvLink()}>昆虫</a>,野生散养攻城狮,“十分”“业余”摄影 Fans。联系我可以通过<a href="mailto:[email protected]">电子邮件</a>如果有必要也可以用<a
46+
href={this.getKunQvLink()}>昆虫</a>,野生散养攻城狮,“十分”“业余”摄影 Fans。联系我可以通过<a href="mailto:[email protected]">电子邮件</a>如果有必要也可用<a
4747
href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/wechat.jpg" target="_blank">微信</a></p>
4848
<ul className="mdc-deprecated-list mdc-deprecated-list--one-line dialog-link-list" id="about-me-dialog_link_list">
4949
<LinkItem link="https://github.com/apqx" title="GitHub" first={true} last={false} />

npm/src/component/dialog/BasicDialog.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
height: 3.2rem;
104104
padding: 0;
105105
border-radius: 0;
106-
106+
107107
@include button.container-fill-color(var(--dialog-action-btn-bg));
108108
@include button.ink-color(var(--dialog-action-btn-ink));
109109
// 启用Ripple的radius-bounded可能导致某些东西溢出元素,导致整个页面宽度不正常可以横向滚动

npm/src/component/drawer.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@
2424
border: none;
2525
padding-left: var(--drawer-padding-horizontal);
2626
padding-right: var(--drawer-padding-horizontal);
27+
// background-color: rgba($color: map.get(base.$surface, "light"), $alpha: 0.8);
28+
// backdrop-filter: blur(30px);
29+
// -webkit-backdrop-filter: blur(30px);
2730
}
2831

2932
.dark .mdc-drawer {
3033
@include elevation.elevation(map.get(base.$drawer-elevation, "elevation"), map.get(base.$drawer-elevation, "shadow-dark"), 0);
34+
// background-color: rgba($color: map.get(base.$surface, "dark"), $alpha: 0.8);
3135
}
3236

3337
.mdc-drawer-scroll-lock {

npm/src/component/react/IndexList.scss

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ body {
2222
}
2323

2424
.index-top-card-container {
25-
padding-top: 0.4rem;
26-
padding-bottom: 0.5rem;
25+
padding-top: 0.1rem;
26+
padding-bottom: 0.18rem;
2727
padding-left: var(--index-card-padding-horizontal);
2828
padding-right: var(--index-card-padding-horizontal);
2929
}
@@ -173,7 +173,8 @@ body {
173173
}
174174

175175
.index-top-card-container {
176-
padding-top: 0.35rem;
176+
padding-top: 0.08rem;
177+
padding-bottom: 0.15rem;
177178
}
178179
}
179180

@@ -184,10 +185,6 @@ body {
184185
--index-card-padding-horizontal: 2rem;
185186
}
186187

187-
.index-top-card-container {
188-
padding-top: 0.35rem;
189-
}
190-
191188
.index-author {
192189
font-size: calc(var(--mdc-typography-body1-font-size) - 0.2rem);
193190
}

npm/src/component/theme.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ body {
146146
--mdc-typography-body1-letter-spacing: normal;
147147
--mdc-typography-body1-font-weight: var(--font-weight-normal);
148148

149+
--mdc-typography-body2-letter-spacing: normal;
150+
149151
// 代码字体
150152
--text-code-font-family: #{base.$text-font-code-block};
151153
// 代码字重,注意段落中的代码块字重,有时候同样字重的中英文字体显示并不一致,需要单独设置
@@ -162,17 +164,26 @@ body {
162164

163165
--mdc-typography-headline1-font-size: calc(var(--mdc-typography-body1-font-size) + 0.6rem);
164166
--mdc-typography-headline1-font-weight: var(--mdc-typography-body1-font-weight);
167+
--mdc-typography-headline1-letter-spacing: normal;
165168

166169
--mdc-typography-headline2-font-size: calc(var(--mdc-typography-body1-font-size) + 0.6rem);
167170
--mdc-typography-headline2-line-height: calc(var(--mdc-typography-body1-font-size) + 1.2rem);
168171
--mdc-typography-headline2-font-weight: var(--mdc-typography-body1-font-weight);
172+
--mdc-typography-headline2-letter-spacing: normal;
169173

170174
--mdc-typography-headline3-font-size: calc(var(--mdc-typography-body1-font-size) + 0.5rem);
171175
--mdc-typography-headline3-line-height: calc(var(--mdc-typography-body1-font-size) + 1rem);
172176
--mdc-typography-headline3-font-weight: var(--mdc-typography-body1-font-weight);
177+
--mdc-typography-headline3-letter-spacing: normal;
173178

179+
--mdc-typography-headline4-letter-spacing: normal;
180+
--mdc-typography-headline5-letter-spacing: normal;
181+
174182
--mdc-typography-headline6-font-size: calc(var(--mdc-typography-body1-font-size) + 0.25rem);
175183
--mdc-typography-headline6-font-weight: var(--mdc-typography-body1-font-weight);
184+
--mdc-typography-headline6-letter-spacing: normal;
185+
186+
--mdc-typography-button-letter-spacing: normal;
176187

177188
// drawer list圆角
178189
--mdc-shape-small: 0.5rem;

npm/src/repository/LocalRepository.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ export class LocalRepository {
1212
this.saveString(key, String(value))
1313
}
1414

15-
getBoolean(key: string): boolean {
15+
getBoolean(key: string): boolean | null {
1616
// 默认为false
1717
const value = this.getString(key)
18+
if (value == null || value == "") return null
1819
return value === "true";
1920
}
2021

@@ -31,23 +32,26 @@ export class LocalRepository {
3132
}
3233

3334
getFixedTopbarOn(): boolean {
34-
return this.getBoolean(this.KEY_FIXED_TOPBAR)
35+
return this.getBoolean(this.KEY_FIXED_TOPBAR) ?? false
3536
}
3637

3738
saveHandwritingFontOn(on: boolean) {
3839
this.saveBoolean(this.KEY_HANDWRITTEN_FONT, on)
3940
}
4041

4142
getHandWritingFontOn(): boolean {
42-
return this.getBoolean(this.KEY_HANDWRITTEN_FONT)
43+
return this.getBoolean(this.KEY_HANDWRITTEN_FONT) ?? false
4344
}
4445

4546
saveNotoSerifSCFontOn(on: boolean) {
4647
this.saveBoolean(this.KEY_NOTO_SERIF_SC_FONT, on)
4748
}
4849

50+
/**
51+
* 获取思源宋体设置,默认开启
52+
*/
4953
getNotoSerifSCFontOn(): boolean {
50-
return this.getBoolean(this.KEY_NOTO_SERIF_SC_FONT)
54+
return this.getBoolean(this.KEY_NOTO_SERIF_SC_FONT) ?? true
5155
}
5256

5357
getTheme(): string {

0 commit comments

Comments
 (0)