koishi-plugin-to-image-service-font-jetbrains-mono 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -7
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -54,17 +54,14 @@ var ToImageServiceFontJetbrainsMono = class extends import_koishi.Service {
|
|
|
54
54
|
for (let i = 0; i < this.fontNames.length; i++) {
|
|
55
55
|
const fontName = this.fontNames[i];
|
|
56
56
|
for (let j = 0; j < 2; j++) {
|
|
57
|
+
const filePath = `fonts/JetBrainsMonoNL-${j === 0 || fontName !== "Regular" ? fontName : ""}${["", "Italic"][j]}.ttf`;
|
|
57
58
|
fonts.push({
|
|
58
59
|
name: "JetBrains Mono",
|
|
59
60
|
weight: (i + 1) * 100,
|
|
60
61
|
style: ["normal", "italic"][j],
|
|
61
|
-
data: await import_promises.default.readFile(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
`../fonts/JetBrainsMonoNL-${j === 0 || fontName !== "Regular" ? fontName : ""}${["", "Italic"][j]}.ttf`
|
|
65
|
-
)
|
|
66
|
-
),
|
|
67
|
-
supports: ["satori"]
|
|
62
|
+
data: await import_promises.default.readFile(import_node_path.default.join(__dirname, "../", filePath)),
|
|
63
|
+
format: "ttf",
|
|
64
|
+
filePath
|
|
68
65
|
});
|
|
69
66
|
}
|
|
70
67
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-to-image-service-font-jetbrains-mono",
|
|
3
3
|
"description": "Provide JetBrains Mono fonts for the to-image-service",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"koishi": "^4.18.10"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"koishi-plugin-to-image-service": "^0.0.
|
|
42
|
+
"koishi-plugin-to-image-service": "^0.0.5"
|
|
43
43
|
},
|
|
44
44
|
"koishi": {
|
|
45
45
|
"service": {
|