Skip to content

Commit 0b6caf7

Browse files
committed
1.0.0
1 parent fee5100 commit 0b6caf7

10 files changed

+192
-75
lines changed
Binary file not shown.

LXGWWenKai-1.510/OFL.txt

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
Copyright 2021-2024 LXGW (https://github.com/lxgw/LxgwWenKai-Screen)
2+
Copyright 2020 The Klee Project Authors (https://github.com/fontworks-fonts/Klee)
3+
4+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
5+
This license is copied below, and is also available with a FAQ at:
6+
https://openfontlicense.org
7+
8+
9+
-----------------------------------------------------------
10+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11+
-----------------------------------------------------------
12+
13+
PREAMBLE
14+
The goals of the Open Font License (OFL) are to stimulate worldwide
15+
development of collaborative font projects, to support the font creation
16+
efforts of academic and linguistic communities, and to provide a free and
17+
open framework in which fonts may be shared and improved in partnership
18+
with others.
19+
20+
The OFL allows the licensed fonts to be used, studied, modified and
21+
redistributed freely as long as they are not sold by themselves. The
22+
fonts, including any derivative works, can be bundled, embedded,
23+
redistributed and/or sold with any software provided that any reserved
24+
names are not used by derivative works. The fonts and derivatives,
25+
however, cannot be released under any other type of license. The
26+
requirement for fonts to remain under this license does not apply
27+
to any document created using the fonts or their derivatives.
28+
29+
DEFINITIONS
30+
"Font Software" refers to the set of files released by the Copyright
31+
Holder(s) under this license and clearly marked as such. This may
32+
include source files, build scripts and documentation.
33+
34+
"Reserved Font Name" refers to any names specified as such after the
35+
copyright statement(s).
36+
37+
"Original Version" refers to the collection of Font Software components as
38+
distributed by the Copyright Holder(s).
39+
40+
"Modified Version" refers to any derivative made by adding to, deleting,
41+
or substituting -- in part or in whole -- any of the components of the
42+
Original Version, by changing formats or by porting the Font Software to a
43+
new environment.
44+
45+
"Author" refers to any designer, engineer, programmer, technical
46+
writer or other person who contributed to the Font Software.
47+
48+
PERMISSION & CONDITIONS
49+
Permission is hereby granted, free of charge, to any person obtaining
50+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
51+
redistribute, and sell modified and unmodified copies of the Font
52+
Software, subject to the following conditions:
53+
54+
1) Neither the Font Software nor any of its individual components,
55+
in Original or Modified Versions, may be sold by itself.
56+
57+
2) Original or Modified Versions of the Font Software may be bundled,
58+
redistributed and/or sold with any software, provided that each copy
59+
contains the above copyright notice and this license. These can be
60+
included either as stand-alone text files, human-readable headers or
61+
in the appropriate machine-readable metadata fields within text or
62+
binary files as long as those fields can be easily viewed by the user.
63+
64+
3) No Modified Version of the Font Software may use the Reserved Font
65+
Name(s) unless explicit written permission is granted by the corresponding
66+
Copyright Holder. This restriction only applies to the primary font name as
67+
presented to the users.
68+
69+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70+
Software shall not be used to promote, endorse or advertise any
71+
Modified Version, except to acknowledge the contribution(s) of the
72+
Copyright Holder(s) and the Author(s) or with their explicit written
73+
permission.
74+
75+
5) The Font Software, modified or unmodified, in part or in whole,
76+
must be distributed entirely under this license, and must not be
77+
distributed under any other license. The requirement for fonts to
78+
remain under this license does not apply to any document created
79+
using the Font Software.
80+
81+
TERMINATION
82+
This license becomes null and void if any of the above conditions are
83+
not met.
84+
85+
DISCLAIMER
86+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94+
OTHER DEALINGS IN THE FONT SOFTWARE.

README.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
[中文](https://github.com/TCOTC/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/blob/main/README_zh_CN.md)
1+
> Recent Updates: Adjusted the default font weight, optimized reading experience using LXGW WenKai Screen.
22
3-
# SiYuan LXGW WenKai font and Twitter Emoji plugin
3+
# LXGW WenKai and Twemoji
44

5-
The font file comes from: [lxgw/LxgwWenkaiGB](https://github.com/lxgw/LxgwWenkaiGB), [converted](https://cloudconvert.com/ttf-to-woff) from .ttf format to .woff format
5+
Font files sourced from: [lxgw/LxgwWenkaiGB-Lite](https://github.com/lxgw/LxgwWenkaiGB-Lite) and [lxgw/LxgwWenKai-Screen](https://github.com/lxgw/LxgwWenKai-Screen). The latter was converted from .ttf to .woff format using [CloudConvert](https://cloudconvert.com/ttf-to-woff).
66

7-
The emoji file comes from: [jdecked/twemoji](https://github.com/jdecked/twemoji): https://artefacts.whynothugo.nl/twemoji.ttf
7+
Emoji files sourced from: [jdecked/twemoji](https://github.com/jdecked/twemoji): https://artefacts.whynothugo.nl/twemoji.ttf
88

9-
### Notice
9+
### Notes
1010

11-
This font has been modified in accordance with the glyph standards of mainland China and is recommended for Chinese users only.
12-
13-
This plugin may not be compatible with other fonts or Emoji plugins in the bazaar, please disable other fonts or Emoji plugins when using this plugin.
11+
This plugin may not be compatible with other font or Emoji plugins available in the marketplace. Please disable other font or Emoji plugins when using this one.
1412

1513
### Acknowledgments
1614

17-
post: [思源笔记手机端和电脑端使用同一字体 - 链滴](https://ld246.com/article/1705399357823)
15+
Post: [思源笔记手机端和电脑端使用同一字体 - 链滴](https://ld246.com/article/1705399357823)
1816

19-
repo: [zuoez02/siyuan-plugin-twitter-emoji](https://github.com/zuoez02/siyuan-plugin-twitter-emoji)
17+
Repository: [zuoez02/siyuan-plugin-twitter-emoji](https://github.com/zuoez02/siyuan-plugin-twitter-emoji)

README_zh_CN.md

+4-28
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,17 @@
1-
[English](https://github.com/TCOTC/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/blob/main/README.md)
1+
> 近期更新:调整默认字重,使用霞鹜文楷屏幕阅读版优化阅读体验
22
3-
# 思源笔记 霞鹜文楷字体和 Twitter Emoji 插件
3+
# 霞鹜文楷和 Twemoji
44

5-
字体文件来自:[lxgw/LxgwWenkaiGB](https://github.com/lxgw/LxgwWenkaiGB),由 .ttf 格式[转换](https://cloudconvert.com/ttf-to-woff)为 .woff 格式
5+
字体文件来自:[lxgw/LxgwWenkaiGB-Lite](https://github.com/lxgw/LxgwWenkaiGB-Lite)[lxgw/LxgwWenKai-Screen](https://github.com/lxgw/LxgwWenKai-Screen),后者由 .ttf 格式[转换](https://cloudconvert.com/ttf-to-woff)为 .woff 格式
66

77
Emoji 文件来自:[jdecked/twemoji](https://github.com/jdecked/twemoji)https://artefacts.whynothugo.nl/twemoji.ttf
88

99
### 注意
1010

11-
本字体按照中国大陆的字形标准修改,仅建议中文使用者使用。
12-
1311
本插件可能与集市中的其他字体或 Emoji 插件不兼容,使用本插件时请禁用其他字体或 Emoji 插件。
1412

15-
表情符号选择器中会出现空位是因为 Emoji 字体暂未支持 [Unicode 16.0](https://github.com/jdecked/twemoji/issues/88)
16-
17-
### 2024.5.1
18-
19-
- 字体文件由 .ttf 格式转换为 .woff 与 .woff2 格式,减小体积、提高加载效率,并尝试兼容 Windows11
20-
21-
### 2024.7.9
22-
23-
- 更换 Emoji 字体来源
24-
25-
### 2024.8.18
26-
27-
- 修复 Emoji 字体打包错误
28-
29-
### 2024.9.10
30-
31-
- 移除 .woff2 格式字体,避免控制台报错
32-
33-
### 2024.10.3
34-
35-
- 更新霞鹜文楷字体到 v1.500 版本
36-
3713
### 鸣谢
3814

3915
帖子:[思源笔记手机端和电脑端使用同一字体 - 链滴](https://ld246.com/article/1705399357823)
4016

41-
仓库:[zuoez02/siyuan-plugin-twitter-emoji](https://github.com/zuoez02/siyuan-plugin-twitter-emoji)
17+
仓库:[zuoez02/siyuan-plugin-twitter-emoji](https://github.com/zuoez02/siyuan-plugin-twitter-emoji)
3.22 MB
Binary file not shown.

index.css

-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +0,0 @@
1-
@font-face {
2-
font-family: "LXGW WenKai GB";
3-
font-style: normal;
4-
src: url("../plugins/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/LXGWWenKaiGB-Regular.woff") format("woff");
5-
}
6-
7-
@font-face {
8-
font-family: 'Twitter Emoji';
9-
font-style: normal;
10-
font-weight: 400;
11-
font-display: swap;
12-
src: url("../plugins/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/Twemoji-15.1.0.ttf");
13-
}
14-
15-
:root {
16-
--b3-font-family: "LXGW WenKai GB", apple-system, BlinkMacSystemFont,"Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Twitter Emoji", "Noto Color Emoji", "OpenMoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols" !important;
17-
--b3-font-family-code: "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family), var(--b3-font-family-emoji) !important;
18-
--b3-font-family-emoji: 'Twitter Emoji', "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji" !important;
19-
}

index.js

+50-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
module.exports = class TwitterEmoji extends require('siyuan').Plugin {};
1+
// module.exports = class PluginLXGWTwemoji extends require('siyuan').Plugin {};
2+
3+
module.exports = class PluginLXGWTwemoji extends require('siyuan').Plugin {
4+
onload() {
5+
console.log("siyuan-ttf-LXGWWenKaiGB-and-Twemoji: loaded");
6+
7+
// 创建 style 元素
8+
const styleElement = document.createElement('style');
9+
styleElement.id = 'snippetCSS-LXGWTwemoji';
10+
11+
// 插入到 head 中
12+
document.head.appendChild(styleElement);
13+
14+
// 获取 CSS 文件内容
15+
fetch('../plugins/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/style.css')
16+
.then(response => {
17+
if (!response.ok) {
18+
throw new Error('siyuan-ttf-LXGWWenKaiGB-and-Twemoji: Failed to load CSS file');
19+
}
20+
return response.text();
21+
})
22+
.then(cssText => {
23+
// 将 CSS 文本插入到 style 元素中
24+
styleElement.textContent = cssText;
25+
})
26+
.catch(error => {
27+
console.error('siyuan-ttf-LXGWWenKaiGB-and-Twemoji: Error loading CSS:', error);
28+
});
29+
}
30+
31+
onunload() {
32+
// 移除 style 元素
33+
const styleElement = document.getElementById('snippetCSS-LXGWTwemoji');
34+
if (styleElement) {
35+
styleElement.remove();
36+
}
37+
38+
console.log("siyuan-ttf-LXGWWenKaiGB-and-Twemoji: unloaded");
39+
}
40+
41+
uninstall() {
42+
// 在卸载时也移除 style 元素
43+
const styleElement = document.getElementById('snippetCSS-LXGWTwemoji');
44+
if (styleElement) {
45+
styleElement.remove();
46+
}
47+
48+
console.log("siyuan-ttf-LXGWWenKaiGB-and-Twemoji: uninstall");
49+
}
50+
}

plugin.json

+7-17
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,44 @@
22
"name": "siyuan-ttf-LXGWWenKaiGB-and-Twemoji",
33
"author": "TCOTC",
44
"url": "https://github.com/TCOTC/siyuan-ttf-LXGWWenKaiGB-and-Twemoji",
5-
"version": "0.3.0",
5+
"version": "1.0.0",
6+
"minAppVersion": "3.1.15",
67
"backends": [
78
"all"
89
],
910
"frontends": [
1011
"all"
1112
],
1213
"displayName": {
13-
"default": "霞鹜文楷 font and Twitter Emoji【Chinese】",
14-
"zh_CN": "霞鹜文楷字体和 Twitter Emoji"
14+
"default": "LXGW WenKai and Twemoji",
15+
"zh_CN": "霞鹜文楷和 Twemoji"
1516
},
1617
"description": {
17-
"default": "【only Chinese】LXGW WenKai GB (font) & Twemoji (Twitter Emoji)",
18-
"zh_CN": "LXGW WenKai GB (霞鹜文楷字体) & Twemoji (Twitter Emoji)"
18+
"default": "LXGW WenKai & Twemoji"
1919
},
2020
"readme": {
2121
"default": "README.md",
2222
"zh_CN": "README_zh_CN.md"
2323
},
2424
"funding": {
25-
"openCollective": "",
26-
"patreon": "",
27-
"github": "",
2825
"custom": [
29-
"https://afdian.com/a/JeffreyChen"
26+
"https://bento.me/jeffff"
3027
]
3128
},
3229
"keywords": [
3330
"font",
3431
"字体",
35-
"",
36-
"",
37-
"霞鹜",
3832
"霞鹜文楷",
3933
"LXGW WenKai GB",
40-
"文楷",
4134
"中文",
4235
"Chinese",
4336
"Twitter",
4437
"siyuan-ttf-LXGWWenKaiGB-and-Twemoji",
45-
"Twemoji",
46-
"Emoji",
4738
"emoji",
4839
"表情包",
4940
"表情",
5041
"符号",
5142
"图标",
52-
"icon",
53-
"TCOTC"
43+
"icon"
5444
]
5545
}

preview.png

-931 KB
Loading

style.css

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* LXGW WenKai */
2+
@font-face {
3+
font-family: "LXGW WenKai";
4+
src: url("../plugins/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/LXGWWenKai-1.510/LXGWWenKaiScreen.woff") format("woff");
5+
font-weight: 400;
6+
font-style: normal;
7+
font-display: swap;
8+
}
9+
@font-face {
10+
font-family: "LXGW WenKai";
11+
src: url("../../../appearance/fonts/LxgwWenKai-Lite-1.501/LXGWWenKaiLite-Regular.ttf") format("truetype"); /* 思源内置字体 */
12+
font-weight: 300;
13+
font-style: normal;
14+
font-display: swap;
15+
}
16+
17+
/* Twemoji */
18+
@font-face {
19+
font-family: "Twemoji";
20+
src: url("../plugins/siyuan-ttf-LXGWWenKaiGB-and-Twemoji/Twemoji/Twemoji-15.1.0.ttf") format("truetype");
21+
font-style: normal;
22+
font-weight: 400;
23+
font-display: swap;
24+
}
25+
26+
:root {
27+
--b3-font-family: "LXGW WenKai", "Twemoji", "Emojis Additional", "Emojis Reset", BlinkMacSystemFont, Helvetica, "Luxi Sans", "DejaVu Sans", "Hiragino Sans", arial, sans-serif, emojis !important;
28+
--b3-font-family-emoji: "Twemoji", "Emojis Additional", emojis !important;
29+
}

0 commit comments

Comments
 (0)