Advertisement
t7yang

KillSerif for Firefox

May 10th, 2017
755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 10.54 KB | None | 0 0
  1. /* Name: KillSerif Style | Custom font with font-face to Sans Serif font for Firefox */
  2. /* 使用者仍須到〔選項〕→〔內容〕中把「中文-台灣」和「中文-簡體」設定為微軟正黑體或對應的字型 */
  3. /* font-face 程式碼源自「第三新夜市仔」 http://blog.yorkxin.org/2012/06/17/assign-fonts-for-specific-characters */
  4.  
  5.  
  6. /* 排除網址之正規表示法由 ettoolong 提供 */
  7. @charset "UTF-8";
  8. @namespace url(http://www.w3.org/1999/xhtml);
  9. @-moz-document regexp("((?!chrome://|telnet://).)*") /* 設定要排除的網址/網站 */
  10. {
  11.    
  12.     /* Normal Font Weight */
  13.  
  14.     @font-face {
  15.         font-family: "Times New Roman";
  16.         font-weight: 400;
  17.         unicode-range: U+4E00-9FFF;
  18.         src: local(" "), local("Microsoft JhengHei");
  19.     }
  20.    
  21.     @font-face {
  22.         font-family: "Arial";
  23.         font-weight: 400;
  24.         unicode-range: U+4E00-9FFF;
  25.         src: local(" "), local("Microsoft JhengHei");
  26.     }
  27.    
  28.     @font-face {
  29.         font-family: "Arial Unicode MS";
  30.         font-weight: 400;
  31.         unicode-range: U+4E00-9FFF;
  32.         src: local(" "), local("Microsoft JhengHei");
  33.     }
  34.    
  35.     @font-face {
  36.         font-family: "Courier";
  37.         font-weight: 400;
  38.         unicode-range: U+4E00-9FFF;
  39.         src: local(" "), local("Microsoft JhengHei");
  40.     }
  41.  
  42.     @font-face {
  43.         font-family: "monospace";
  44.         font-weight: 400;
  45.         src: local(" "), local("Consolas");
  46.     }
  47.    
  48.     @font-face {
  49.         font-family: "SimSun";
  50.         font-weight: 400;
  51.         src: local(" "), local("Microsoft JhengHei");
  52.     }
  53.  
  54.     @font-face {
  55.         font-family: "宋体";
  56.         font-weight: 400;
  57.         src: local(" "), local("Microsoft JhengHei");
  58.     }
  59.  
  60.     @font-face {
  61.         font-family: "SimHei";
  62.         font-weight: 400;
  63.         src: local(" "), local("Microsoft JhengHei");
  64.     }
  65.  
  66.     @font-face {
  67.         font-family: "NSimSun";
  68.         font-weight: 400;
  69.         src: local(" "), local("Microsoft JhengHei");
  70.     }
  71.  
  72.     @font-face {
  73.         font-family: "FangSong";
  74.         font-weight: 400;
  75.         src: local(" "), local("Microsoft JhengHei");
  76.     }
  77.  
  78.     @font-face {
  79.         font-family: "KaiTi";
  80.         font-weight: 400;
  81.         src: local(" "), local("DFKai-SB");
  82.     }
  83.  
  84.     @font-face {
  85.         font-family: "楷体";
  86.         font-weight: 400;
  87.         src: local(" "), local("DFKai-SB");
  88.     }
  89.  
  90.     @font-face {
  91.         font-family: "DFKai-SB";
  92.         font-weight: 400;
  93.         src: local(" "), local("DFKai-SB");
  94.     }
  95.  
  96.     @font-face {
  97.         font-family: "Microsoft YaHei";
  98.         font-weight: 400;
  99.         src: local(" "), local("Microsoft JhengHei");
  100.     }
  101.  
  102.     @font-face {
  103.         font-family: "Microsoft YaHei UI";
  104.         font-weight: 400;
  105.         src: local(" "), local("Microsoft JhengHei");
  106.     }
  107.  
  108.     @font-face {
  109.         font-family: "微软雅黑";
  110.         font-weight: 400;
  111.         src: local(" "), local("Microsoft JhengHei");
  112.     }
  113.  
  114.     @font-face {
  115.         font-family: "黑体";
  116.         font-weight: 400;
  117.         src: local(" "), local("Microsoft JhengHei");
  118.     }
  119.  
  120.     @font-face {
  121.         font-family: "PMingLiU";
  122.         font-weight: 400;
  123.         src: local(" "), local("Microsoft JhengHei");
  124.     }
  125.  
  126.     @font-face {
  127.         font-family: "新細明體";
  128.         font-weight: 400;
  129.         src: local(" "), local("Microsoft JhengHei");
  130.     }
  131.  
  132.     @font-face {
  133.         font-family: "微軟正黑體";
  134.         font-weight: 400;
  135.         src: local(" "), local("Microsoft JhengHei");
  136.     }
  137.  
  138.     @font-face {
  139.         font-family: "Microsoft JhengHei";
  140.         font-weight: 400;
  141.         src: local(" "), local("Microsoft JhengHei");
  142.     }
  143.  
  144.     @font-face {
  145.         font-family: "Microsoft JhengHei UI";
  146.         font-weight: 400;
  147.         src: local(" "), local("Microsoft JhengHei");
  148.     }
  149.  
  150.     /* 來自 ccs.hanzi.co 的解決方案,但目前似乎在回退機制上有點問題出現,解除註解可以讓 KillsSerif Style 處理這些字型 */
  151.     @font-face {
  152.         font-family: "Biaodian Pro Sans";
  153.         font-weight: 400;
  154.         src: local(" "), local("Microsoft JhengHei");
  155.     }
  156.    
  157.     @font-face {
  158.         font-family: "Biaodian Pro Serif";
  159.         font-weight: 400;
  160.         src: local(" "), local("Microsoft JhengHei");
  161.     }
  162.  
  163.     @font-face {
  164.         font-family: "Biaodian Pro Sans CNS";
  165.         font-weight: 400;
  166.         src: local(" "), local("Microsoft JhengHei");
  167.     }
  168.  
  169.     @font-face {
  170.         font-family: "Biaodian Pro Serif CNS";
  171.         font-weight: 400;
  172.         src: local(" "), local("Microsoft JhengHei");
  173.     }
  174.  
  175.     @font-face {
  176.         font-family: "Biaodian Pro Sans GB";
  177.         font-weight: 400;
  178.         src: local(" "), local("Microsoft JhengHei");
  179.     }
  180.  
  181.     @font-face {
  182.         font-family: "Biaodian Pro Serif GB";
  183.         font-weight: 400;
  184.         src: local(" "), local("Microsoft JhengHei");
  185.     }
  186.  
  187.     @font-face {
  188.         font-family: "Biaodian Sans";
  189.         font-weight: 400;
  190.         src: local(" "), local("Microsoft JhengHei");
  191.     }
  192.  
  193.     @font-face {
  194.         font-family: "Biaodian Serif";
  195.         font-weight: 400;
  196.         src: local(" "), local("Microsoft JhengHei");
  197.     }
  198.  
  199.     /* 細明體是 Windows 系統下的中文等寬字型,因此如非必要,不建議替換成黑體
  200.     @font-face {
  201.         font-family: "MingLiU";
  202.         font-weight: 400;
  203.         src: local(" "), local("Microsoft JhengHei");
  204.     }
  205.  
  206.     @font-face {
  207.         font-family: "細明體";
  208.         font-weight: 400;
  209.         src: local(" "), local("Microsoft JhengHei");
  210.     }
  211.     */
  212.    
  213.     /* 針對蘋果作業系統 */
  214.     @font-face {
  215.         font-family: "Heiti TC";
  216.         font-weight: 400;
  217.         src: local(" "), local("Microsoft JhengHei");
  218.     }
  219.    
  220.     @font-face {
  221.         font-family: "Heiti SC";
  222.         font-weight: 400;
  223.         src: local(" "), local("Microsoft JhengHei");
  224.     }
  225.    
  226.    
  227.    
  228.     /* Bold Font Weight */
  229.  
  230.     @font-face {
  231.         font-family: "Times New Roman";
  232.         font-weight: 700;
  233.         unicode-range: U+4E00-9FFF;
  234.         src: local(" "), local("Microsoft JhengHei Bold");
  235.     }
  236.    
  237.     @font-face {
  238.         font-family: "Arial";
  239.         font-weight: 700;
  240.         unicode-range: U+4E00-9FFF;
  241.         src: local(" "), local("Microsoft JhengHei Bold");
  242.     }
  243.    
  244.     @font-face {
  245.         font-family: "Arial Unicode MS";
  246.         font-weight: 700;
  247.         unicode-range: U+4E00-9FFF;
  248.         src: local(" "), local("Microsoft JhengHei Bold");
  249.     }
  250.    
  251.     @font-face {
  252.         font-family: "Courier";
  253.         font-weight: 700;
  254.         unicode-range: U+4E00-9FFF;
  255.         src: local(" "), local("Microsoft JhengHei Bold");
  256.     }
  257.  
  258.     @font-face {
  259.         font-family: "monospace";
  260.         font-weight: 700;
  261.         src: local(" "), local("Consolas");
  262.     }
  263.    
  264.     @font-face {
  265.         font-family: "SimSun";
  266.         font-weight: 700;
  267.         src: local(" "), local("Microsoft JhengHei Bold");
  268.     }
  269.  
  270.     @font-face {
  271.         font-family: "宋体";
  272.         font-weight: 700;
  273.         src: local(" "), local("Microsoft JhengHei Bold");
  274.     }
  275.  
  276.     @font-face {
  277.         font-family: "SimHei";
  278.         font-weight: 700;
  279.         src: local(" "), local("Microsoft JhengHei Bold");
  280.     }
  281.  
  282.     @font-face {
  283.         font-family: "NSimSun";
  284.         font-weight: 700;
  285.         src: local(" "), local("Microsoft JhengHei Bold");
  286.     }
  287.  
  288.     @font-face {
  289.         font-family: "FangSong";
  290.         font-weight: 700;
  291.         src: local(" "), local("Microsoft JhengHei Bold");
  292.     }
  293.  
  294.     @font-face {
  295.         font-family: "KaiTi";
  296.         font-weight: 700;
  297.         src: local(" "), local("DFKai-SB");
  298.     }
  299.  
  300.     @font-face {
  301.         font-family: "楷体";
  302.         font-weight: 700;
  303.         src: local(" "), local("DFKai-SB");
  304.     }
  305.  
  306.     @font-face {
  307.         font-family: "DFKai-SB";
  308.         font-weight: 700;
  309.         src: local(" "), local("DFKai-SB");
  310.     }
  311.  
  312.     @font-face {
  313.         font-family: "Microsoft YaHei";
  314.         font-weight: 700;
  315.         src: local(" "), local("Microsoft JhengHei Bold");
  316.     }
  317.  
  318.     @font-face {
  319.         font-family: "Microsoft YaHei UI";
  320.         font-weight: 700;
  321.         src: local(" "), local("Microsoft JhengHei Bold");
  322.     }
  323.  
  324.     @font-face {
  325.         font-family: "微软雅黑";
  326.         font-weight: 700;
  327.         src: local(" "), local("Microsoft JhengHei Bold");
  328.     }
  329.  
  330.     @font-face {
  331.         font-family: "黑体";
  332.         font-weight: 700;
  333.         src: local(" "), local("Microsoft JhengHei Bold");
  334.     }
  335.  
  336.     @font-face {
  337.         font-family: "PMingLiU";
  338.         font-weight: 700;
  339.         src: local(" "), local("Microsoft JhengHei Bold");
  340.     }
  341.  
  342.     @font-face {
  343.         font-family: "新細明體";
  344.         font-weight: 700;
  345.         src: local(" "), local("Microsoft JhengHei Bold");
  346.     }
  347.  
  348.     @font-face {
  349.         font-family: "微軟正黑體";
  350.         font-weight: 700;
  351.         src: local(" "), local("Microsoft JhengHei Bold");
  352.     }
  353.  
  354.     @font-face {
  355.         font-family: "Microsoft JhengHei";
  356.         font-weight: 700;
  357.         src: local(" "), local("Microsoft JhengHei Bold");
  358.     }
  359.  
  360.     @font-face {
  361.         font-family: "Microsoft JhengHei UI";
  362.         font-weight: 700;
  363.         src: local(" "), local("Microsoft JhengHei Bold");
  364.     }
  365.  
  366.     /* 來自 ccs.hanzi.co 的解決方案,但目前似乎在回退機制上有點問題出現,解除註解可以讓 KillsSerif Style 處理這些字型 */
  367.     @font-face {
  368.         font-family: "Biaodian Pro Sans";
  369.         font-weight: 700;
  370.         src: local(" "), local("Microsoft JhengHei Bold");
  371.     }
  372.    
  373.     @font-face {
  374.         font-family: "Biaodian Pro Serif";
  375.         font-weight: 700;
  376.         src: local(" "), local("Microsoft JhengHei Bold");
  377.     }
  378.    
  379.     @font-face {
  380.         font-family: "Biaodian Pro Sans CNS";
  381.         font-weight: 700;
  382.         src: local(" "), local("Microsoft JhengHei Bold");
  383.     }
  384.    
  385.     @font-face {
  386.         font-family: "Biaodian Pro Serif CNS";
  387.         font-weight: 700;
  388.         src: local(" "), local("Microsoft JhengHei Bold");
  389.     }
  390.    
  391.     @font-face {
  392.         font-family: "Biaodian Pro Sans GB";
  393.         font-weight: 700;
  394.         src: local(" "), local("Microsoft JhengHei Bold");
  395.     }
  396.    
  397.     @font-face {
  398.         font-family: "Biaodian Pro Serif GB";
  399.         font-weight: 700;
  400.         src: local(" "), local("Microsoft JhengHei Bold");
  401.     }
  402.    
  403.     @font-face {
  404.         font-family: "Biaodian Sans";
  405.         font-weight: 700;
  406.         src: local(" "), local("Microsoft JhengHei Bold");
  407.     }
  408.    
  409.     @font-face {
  410.         font-family: "Biaodian Serif";
  411.         font-weight: 700;
  412.         src: local(" "), local("Microsoft JhengHei Bold");
  413.     }
  414.  
  415.     /* 細明體是 Windows 系統下的中文等寬字型,因此如非必要,不建議替換成黑體
  416.     @font-face {
  417.         font-family: "MingLiU";
  418.         font-weight: 700;
  419.         src: local(" "), local("Microsoft JhengHei Bold");
  420.     }
  421.  
  422.     @font-face {
  423.         font-family: "細明體";
  424.         font-weight: 700;
  425.         src: local(" "), local("Microsoft JhengHei Bold");
  426.     }
  427.     */
  428.    
  429.     /* 針對蘋果作業系統 */
  430.     @font-face {
  431.         font-family: "Heiti TC";
  432.         font-weight: 700;
  433.         src: local(" "), local("Microsoft JhengHei Bold");
  434.     }
  435.    
  436.     @font-face {
  437.         font-family: "Heiti SC";
  438.         font-weight: 700;
  439.         src: local(" "), local("Microsoft JhengHei Bold");
  440.     }
  441.  
  442.     /* 文字陰影效果,開啟後會有文字加粗的感覺,粗度建議範圍 0.001~0.01em */
  443.     body {
  444.         text-shadow: 0 0 0.03em;
  445.     }
  446.    
  447. }
  448.  
  449.  
  450. /*
  451. 主旨:此 UserStyle 由 t7yang 整合網路上各方網友的創意, 目的為透過 font-face 語法來讓使用者自訂瀏覽器要使用字型。
  452.  
  453. 問題回報:任何問題請寫信至 t7yang(小老鼠)ymail點com
  454.  
  455. 更新記錄:http://goo.gl/PhX31f (使用者可對記錄進行評論)
  456.  
  457. 授權方式:創用CC之姓名標示─非商業性─相同方式分享
  458.  
  459. 本授權條款允許使用者重製、散布、傳輸以及修改著作,但不得為商業目的之使用。若使用者修改該著作時,僅得依本授權條款或與本授權條款類似者來散布該衍生作品。使用時必須按照著作人指定的方式表彰其姓名。
  460. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement