由于笔者太菜了,没能成功地将字体内置到 Gridea 中(WSL × Electron 太难搞),就只好在安装后修改了。

这里使用和 Gridea Web 相同的字体:iA Writer Mono

下载链接:OneDrive | JsDelivr

下载后将 iAWriterMonoS-Regular.woff2 iAWriterMonoS-Italic.woff2 iAWriterMonoS-Bold.woff2 iAWriterMonoS-BoldItalic.woff2 移动到 Gridea/resources/app/fonts 目录下。

Gridea/resources/app/css/app.***.css 的末尾插入以下内容:

@font-face {
    font-family: "iA Writer Mono";
    font-style: normal;
    font-weight: normal;
    src: url("../fonts/iAWriterMonoS-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "iA Writer Mono";
    font-style: italic;
    font-weight: normal;
    src: url("../fonts/iAWriterMonoS-Italic.woff2") format("woff2");
}

@font-face {
    font-family: "iA Writer Mono";
    font-style: normal;
    font-weight: bold;
    src: url("../fonts/iAWriterMonoS-Bold.woff2") format("woff2");
}

@font-face {
    font-family: "iA Writer Mono";
    font-style: italic;
    font-weight: bold;
    src: url("../fonts/iAWriterMonoS-BoldItalic.woff2") format("woff2");
}

.monaco-editor .view-lines {
    font-family: "iA Writer Mono", Menlo, "PingFang SC", -apple-system, "SF UI Text", "Lucida Grande", STheiti, "Microsoft YaHei", sans-serif !important;
}

重启 Gridea 即可生效。


或者直接引用 CSS ,无需下载字体。

@import url("https://cdn.jsdelivr.net/gh/codex-src/iA-Fonts@master/iA%20Writer%20Mono/Webfonts/index.css");

插入到 Gridea/resources/app/css/app.***.css 的末尾即可。