User:SkyEye FAST/font-supplement.js/doc:修订间差异

来自Minecraft Wiki
跳转到导航 跳转到搜索
添加的内容 删除的内容
无编辑摘要
无编辑摘要
 
第4行: 第4行:
== 字体说明 ==
== 字体说明 ==


此脚本从[https://fonts.im/ Google Fonts]加载了[https://fonts.google.com/noto/specimen/Noto+Sans+SC Noto Sans SC]、[https://fonts.google.com/noto/specimen/Noto+Sans+TC Noto Sans TC]和[https://fonts.google.com/noto/specimen/Noto+Sans+HK Noto Sans HK],从[https://fonts.zeoseven.com/ ZeoSeven Fonts]加载了[https://fonts.zeoseven.com/items/48/ Source Han Serif VF]、[https://fonts.zeoseven.com/items/95/ 霞鹜文楷 GB][https://fonts.zeoseven.com/items/5/ 寒蝉正楷体],并为{{t|Quote}}等模板设置了字体跌返。
此脚本从[https://fonts.im/ Google Fonts]加载了[https://fonts.google.com/noto/specimen/Noto+Sans+SC Noto Sans SC]、[https://fonts.google.com/noto/specimen/Noto+Sans+TC Noto Sans TC]和[https://fonts.google.com/noto/specimen/Noto+Sans+HK Noto Sans HK],从[https://fonts.zeoseven.com/ ZeoSeven Fonts]加载了[https://fonts.zeoseven.com/items/48/ Source Han Serif VF]、[https://fonts.zeoseven.com/items/95/ 霞鹜文楷 GB][https://fonts.zeoseven.com/items/5/ 寒蝉正楷体]和[https://fonts.zeoseven.com/items/159/ 更纱黑体 Mono SC],并为{{t|Quote}}等模板设置了字体跌返。


== 使用 ==
== 使用 ==
第24行: 第24行:
window.useInfoboxFont = false; // .infobox-row-field
window.useInfoboxFont = false; // .infobox-row-field
window.useHeadingFont = false; // .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4
window.useHeadingFont = false; // .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4
window.useMonoFont = false; // code, samp, tt, pre, .mw-code, .mw-script
window.useQuoteFont = false; // .quote-content
window.useQuoteFont = false; // .quote-content
</syntaxhighlight>
</syntaxhighlight>

2025年3月16日 (日) 10:50的最新版本

[ 刷新 ]
这是文档页面,它应该被放置到User:SkyEye FAST/font-supplement.js。查看Template:Documentation以获取更多信息。

字体说明[编辑 | 编辑源代码]

此脚本从Google Fonts加载了Noto Sans SCNoto Sans TCNoto Sans HK,从ZeoSeven Fonts加载了Source Han Serif VF霞鹜文楷 GB寒蝉正楷体更纱黑体 Mono SC,并为{{Quote}}等模板设置了字体跌返。

使用[编辑 | 编辑源代码]

你的common.js加入如下代码来使用此脚本:

mw.loader.load('//zh.minecraft.wiki/index.php?title=User:SkyEye_FAST/font-supplement.js&action=raw&ctype=text/javascript');

由于寒蝉正楷体使用台标字形,在设备上已有部分相关字体时不会优先加载。默认会优先加载霞鹜文楷 GB。

你可以设置下面的变量切换为优先加载寒蝉正楷体:

window.preferredFont = 'ChillKai';

你也可以设置下面的变量来禁用某些样式:

window.useInfoboxFont = false; // .infobox-row-field
window.useHeadingFont = false; // .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4
window.useMonoFont = false; // code, samp, tt, pre, .mw-code, .mw-script
window.useQuoteFont = false; // .quote-content