YT字幕自定義

YouTube Subtitles font modify

/* ==UserStyle==
@name           YT字幕自定義
@namespace      https://greasyfork.org/zh-TW/users/4839
@homepageURL    https://greasyfork.org/zh-TW/scripts/486678
@author         leadra
@description    YouTube Subtitles font modify
@version        1.1.3
@license        MIT
@preprocessor stylus

@var text       font_sys                "字體自行輸入"    Trebuchet MS
@var select     font_se                 "字體選擇"      ["'芫荽'*","'免安裝芫荽'","'台灣圓體'","'免安裝台灣圓體'","'jf open 粉圓 2.0'","'免安裝jf粉圓'","'源泉圓體'","'免安裝霞鶩文楷(簡)'","'免安裝yozai悠哉(簡)'","'微軟正黑體'","'免安裝獅尾腿黑體'","sans-serif", "serif", "monospace"]
@var select     font_weight             "字體細粗"      ["normal", "bold*"]
@var select     font_style              "字體正斜"      ["normal*", "italic"]
@var number     font_size               "字體size"      [50, 0, 110, 5,"px"]
@var color      font_color              "字體色"        rgba(255, 255, 255, 1)
@var number     sh_size                 "字框size"      [3, 0, 10, 1,"px"]
@var color      sh_color                "字框色"        rgba(7, 5, 255, 1)
@var range     font_h                 "字幕高度%"      [2, 0, 100, 1,"%"]
==/UserStyle== */
/*參考https://userstyles.world/style/3881/youtube-netflix-subtitles*/
@-moz-document url-prefix("https://www.youtube.com/watch?v=") {
/*字體*/
.ytp-caption-segment {
	text-align: center !important;
	line-height: normal !important;
	//font-family: Iansui,Netflix Sans, Helvetica Nueue, Helvetica, Arial, sans-serif !important;
    font-family: font_sys, font_se !important;
        font-weight: font_weight !important;
        font-style: font_style !important;
        color: font_color !important;
        text-shadow: 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color, 0 0 sh_size sh_color !important;
}
/*大小*/
.ytp-big-mode > div > div > span > span > span {
	font-size: font_size !important;
}
.ytp-hide-info-bar > div > div > span > span > span {
    font-size: font_size !important;
}
/*背景*/
.ytp-caption-segment {
	background: none !important;
}
.caption-window {
	text-align: center !important;
}
/*字幕高度*/
.ytp-big-mode > div > .caption-window, .ytp-hide-info-bar > div > .caption-window {
	bottom: font_h !important;
}
.ytp-big-mode.ytp-autohide-active > div > .caption-window, .ytp-autohide > div > .caption-window {
	bottom: font_h !important;
}
@font-face {
  font-family: '免安裝芫荽';
  src: url(https://api.products.aspose.app/font/api/files?uri=cc7ab18d-1b20-47b4-8506-2f38de9be433.woff2);
   //url(https://api.groupdocs.app/conversion/v1/download?folderName=bc6a30f2-5ee9-4f34-b085-ba9208cbd701&fileName=Iansui-Regular.woff2);
   //url(https://api.products.aspose.app/font/api/files?uri=5f90b846-d53e-48c1-855b-858629ae9ae8.woff2);
}
@font-face {
  font-family: '免安裝台灣圓體';
  src: url(https://cdn.jsdelivr.net/gh/max32002/TaiwanPearl@2.125/webfont/TaiwanPearl-Regular.woff2) format("woff2")
    , url(https://cdn.jsdelivr.net/gh/max32002/TaiwanPearl@2.125/webfont/TaiwanPearl-Regular.woff) format("woff");
}
@font-face {
  font-family: '免安裝jf粉圓';
  src: url(https://h0nibs2hyyc8koqvwbe8sa.on.drv.tw/webfont/jfopen2m.woff2) format("woff2");
  //url(https://api.products.aspose.app/font/api/files?uri=4978ac42-458d-4efd-b672-bf23697842a8.woff2) format("woff2");
  //url(https://anyconv.com/api/action/download/d867437a09d034993684f47105036631/?name=jf-openhuninn-2.0.woff2) format("woff2");
}
@font-face {
  font-family: '免安裝霞鶩文楷(簡)';
  src: url(https://api.products.aspose.app/font/api/files?uri=733e54be-7a41-4c93-9181-37b2c2b9c39e.woff2) format("woff2");
}
@font-face {
  font-family: '免安裝yozai悠哉(簡)';
  src: url(https://api.groupdocs.app/conversion/v1/download?folderName=db6b43f3-0d66-4d4f-8a36-8bbe8fa8d13f&fileName=Yozai-Bold.woff2) format("woff2");
}

@font-face {
  font-family: '免安裝獅尾腿黑體';
  src: url(https://cdn.jsdelivr.net/gh/max32002/swei-right-bottom-leg@2.130/WebFont/CJK%20TC/SweiRightBottomLegCJKtc-Regular.woff2) format("woff2");
}

}
/*
https://zi-hi.com/繁體中文免費字型列表
https://jfsblog.com/blog/post/huninn

'芫荽'Iansui
https://github.com/ButTaiwan/iansui?tab=readme-ov-file
'台灣圓體'
https://github.com/max32002/TaiwanPearl?tab=readme-ov-file
'jf open 粉圓 2.0'
https://github.com/justfont/open-huninn-font?tab=readme-ov-file
'源泉圓體'GenSenRounded JP
https://github.com/ButTaiwan/gensen-font?tab=readme-ov-file
霞鶩文楷LXGW WenKai
https://github.com/lxgw/LxgwWenKai
悠哉體yozai
https://github.com/lxgw/yozai-font
微軟正黑體Microsoft JhengHei

獅尾右下腿黑體
https://max-everyday.com/2021/08/swei-right-bottom-leg/
*/