Skip to content

Commit

Permalink
1. 更改统一的字体 fixed #7
Browse files Browse the repository at this point in the history
2. 加大 5% 的文字大小
  • Loading branch information
AntonVanke committed Nov 6, 2022
1 parent 8e89594 commit 05d4e57
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Typora theme: Cement.

### 如何使用

1. [下载`cement.css`]([Releases · AntonVanke/Typora-Cement-Theme (github.com)](https://github.com/AntonVanke/Typora-Cement-Theme/releases/))
1. [下载打包好的压缩包]([Releases · AntonVanke/Typora-Cement-Theme (github.com)](https://github.com/AntonVanke/Typora-Cement-Theme/releases/))

2. 打开`Typora`->`文件`->`偏好设置`->`外观`->`打开主题文件夹`

3. 复制`cement.css`到文件夹下
3. 复制`cement.css`文件、`cement`文件夹到主题文件夹下

4. 重启`Typora`

Expand Down
30 changes: 4 additions & 26 deletions cement.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
/*
MIT License
Copyright (c) 2022 Vanke Anton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
@import "cement/font.css";
:root {
/*
Color
Expand Down Expand Up @@ -83,9 +61,9 @@ SOFTWARE.
主题所设置的变量
*/
/* 基础字体 */
--font-family-base: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-family-base: "思源黑体 CN", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
/*等宽代码字体*/
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--font-family-monospace: "Fira Code", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/* 编辑区背景颜色 */
--write-bg-color: var(--color-white);
/* 圆角 */
Expand Down Expand Up @@ -139,7 +117,7 @@ SOFTWARE.

body {
background: var(--bg-color);
font: 100%/1.65 var(--font-family-base);
font: 105%/1.65 var(--font-family-base);
max-width: 950px;
}

Expand Down
Binary file added cement/FiraCode-Regular.ttf
Binary file not shown.
Binary file added cement/SourceHanSansCN-Light.otf
Binary file not shown.
Binary file added cement/SourceHanSansCN-Medium.otf
Binary file not shown.
Binary file added cement/SourceHanSansCN-Normal.otf
Binary file not shown.
35 changes: 35 additions & 0 deletions cement/font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
字体 Font: SourceHanSans
LICENSE: https://github.com/adobe-fonts/source-han-sans/blob/master/LICENSE.txt
*/
@font-face {
font-family: '思源黑体 CN';
font-weight: 300;
src: url("SourceHanSansCN-Light.otf") format('opentype');
font-style: normal;
}

@font-face {
font-family: '思源黑体 CN';
font-weight: 400;
src: url("SourceHanSansCN-Normal.otf") format('opentype');
font-style: normal;
}

@font-face {
font-family: '思源黑体 CN';
font-weight: 500;
src: url("SourceHanSansCN-Medium.otf") format('opentype');
font-style: normal;
}

/*
代码块字体 Code block font: Fira Code
LICENSE: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
*/
@font-face {
font-family: 'Fira Code';
src: url('FiraCode-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

0 comments on commit 05d4e57

Please sign in to comment.