Skip to content

CCW自定义字体 by diaowinner

Screenshot of CCW自定义字体

Details

Authordiaowinner

LicenseNo License

Categoryccw

Created

Updated

Size4.3 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

刁氏 CCW模块 v1.0 by diaowinner(祝融号指挥舰)
原理:通过欺骗浏览器使用“local”函数假装是Helvetica Neue/mononoki字体,从而实现替换效果
字体所使用“更纱黑体”,OFL。

Notes

此版本可能有些东西显示成微软雅黑,报给我。

Source code

/* ==UserStyle==
@name         CCW自定义字体
@version      v1.1
@namespace    userstyles.world/user/diaowinner
@description  刁氏 CCW模块 v1.0 by diaowinner(祝融号指挥舰)
原理:通过欺骗浏览器使用“local”函数假装是Helvetica Neue/mononoki字体,从而实现替换效果
字体所使用“更纱黑体”,OFL。
@author       diaowinner
@license      No License
==/UserStyle== */
@-moz-document domain("ccw.site") {
    /*
刁氏 CCW模块 v1.0 by diaowinner(祝融号指挥舰)
原理:通过欺骗浏览器使用“local”函数假装是Helvetica Neue/mononoki字体,从而实现替换效果
字体所使用“更纱黑体”,OFL。
*/
    @font-face {
        /*普通字体*/
        font-family: "Helvetica Neue";
        font-weight: normal;
        src: local("Sarasa Gothic K");
    }
    @font-face {
        /*粗体*/
        font-family: "Helvetica Neue";
        font-weight: bold;
        src: local("Sarasa Gothic K Bold");
    }
    @font-face {
        /*斜体*/
        font-family: "Helvetica Neue";
        font-style: italic;
        src: local("Sarasa Gothic K Italic");
    }
    @font-face {
        /*粗体斜体*/
        font-family: "Helvetica Neue";
        font-weight: bold;
        font-style: italic;
        src: local("Sarasa Gothic K Bold Italic");
    }
    @font-face {
        /*为了兼容性设置区域,同普通字体*/
        font-family: "Microsoft YaHei";
        font-weight: normal;
        src: local("Sarasa Gothic K");
    }
    @font-face {
        /*这个也一样*/
        font-family: "Segoe UI";
        font-weight: normal;
        src: local("Sarasa Gothic K");
    }
    @font-face {
        /*这个粗体*/
        font-family: "Segoe UI";
        font-weight: bold;
        src: local("Sarasa Gothic K Bold");
    }
    @font-face {
        /*创造者学院*/
        font-family: "Georgia";
        font-weight: normal;
        src: local("Sarasa Gothic K");
    }
    @font-face {
        /*创造者学院*/
        font-family: "Georgia";
        font-weight: bold;
        src: local("Sarasa Gothic K Bold");
    }
    @font-face {
        /*创造者学院*/
        font-family: "Georgia";
        font-style: italic;
        src: local("Sarasa Gothic K Italic");
    }
    @font-face {
        /*创造者学院*/
        font-family: "Georgia";
        font-weight: bold;
        font-style: italic;
        src: local("Sarasa Gothic K Bold Italic");
    }
    @font-face {
        /*创造者学院*/
        font-family: "Helvetica Neue";
        font-weight: normal;
        src: local("Sarasa Gothic K");
    }
    @font-face {
        /*等宽字体*/
        font-family: "mononoki";
        font-weight: normal;
        src: local("Sarasa Mono K");
    }
    @font-face {
        /*等宽粗体*/
        font-family: "mononoki";
        font-weight: bold;
        src: local("Sarasa Mono K Bold");
    }
    @font-face {
        /*等宽斜体*/
        font-family: "mononoki";
        font-weight: normal;
        font-style: italic;
        src: local("Sarasa Mono K Italic");
    }
    @font-face {
        /*等宽粗斜*/
        font-family: "mononoki";
        font-weight: bold;
        font-style: italic;
        src: local("Sarasa Mono K Bold Italic");
    }
    @font-face {
        /*等宽字体*/
        font-family: "Consolas";
        font-weight: normal;
        src: local("Sarasa Mono K");
    }
    @font-face {
        /*等宽粗体*/
        font-family: "Consolas";
        font-weight: bold;
        src: local("Sarasa Mono K Bold");
    }
    @font-face {
        /*等宽斜体*/
        font-family: "Consolas";
        font-weight: normal;
        font-style: italic;
        src: local("Sarasa Mono K Italic");
    }
    @font-face {
        /*等宽粗斜*/
        font-family: "Consolas";
        font-weight: bold;
        font-style: italic;
        src: local("Sarasa Mono K Bold Italic");
    }
    .cc-content p,
    .text-I3-NE,
    button.md-button:nth-child(1),
    .filter_filter-input_1iiEt,
    .nav-search-keyword-2EXWL,
    .c-textarea,
    button.btn-primary:nth-child(1),
    section:nth-child(2) > p,
    input,
    button {
        /*这些东西需要重新设置字体*/
        font-family: "Helvetica Neue" !important;
    }
}

Reviews

No reviews yet.