/* ==UserStyle==
@name:en Global Font: Adobe-branded
@name 全局思源黑体
@namespace franciszhao
@version 2.5.2
@description:en An user stylesheet to replace all fonts on web pages with Adobe-branded fonts, brings you a more unified and beautiful visual style.
@description 一款使用 Adobe 品牌字体替换网页原有字体的用户样式表，为你呈现更统一美观的页面风格。
@author Francis Zhao <francis@n2o.io>
@homepageURL https://n2o.io/go?page=userstyles
@supportURL https://n2o.io/go?page=userstyles
@license MIT
@preprocessor default
==/UserStyle== */

@use 'base';
@use 'specific';

// 全局字体定义

// 衬线字体
$font-serif: 'Source Serif 4';
$font-serif-fallback: 'Source Serif Pro', 'Noto Serif', 'Roboto Slab';

$font-serif-sc: 'Source Han Serif SC';
$font-serif-sc-fallback: 'Noto Serif CJK SC', '方正新书宋_GBK', $font-serif,
  $font-serif-fallback;

$font-serif-tc: 'Source Han Serif TC';
$font-serif-tc-fallback: 'Noto Serif CJK TC', $font-serif, $font-serif-fallback;

$font-serif-hc: 'Source Han Serif HC';
$font-serif-hc-fallback: 'Noto Serif CJK HC', $font-serif-tc,
  $font-serif-tc-fallback;

$font-serif-j: 'Source Han Serif';
$font-serif-j-fallback: 'Noto Serif CJK JP', $font-serif, $font-serif-fallback;

$font-serif-k: 'Source Han Serif K';
$font-serif-k-fallback: 'Noto Serif CJK KR', $font-serif, $font-serif-fallback;

// 无衬线字体
$font-sans-serif: 'Source Sans 3';
$font-sans-serif-fallback: 'Source Sans Pro', 'Noto Sans', 'Roboto';

$font-sans-serif-sc: 'Source Han Sans SC';
$font-sans-serif-sc-fallback: 'Noto Sans CJK SC', 'HanHei SC',
  '方正兰亭黑_GB18030', '方正兰亭黑_GBK', base.$font-system-ui;

$font-sans-serif-tc: 'Source Han Sans TC';
$font-sans-serif-tc-fallback: 'Noto Sans CJK TC', 'HanHei TC',
  base.$font-system-ui;

$font-sans-serif-hc: 'Source Han Sans HC';
$font-sans-serif-hc-fallback: 'Noto Sans CJK HC', $font-sans-serif-tc,
  $font-sans-serif-tc-fallback;

$font-sans-serif-j: 'Source Han Sans';
$font-sans-serif-j-fallback: 'Noto Sans CJK JP', 'Hiragino Kaku Gothic Pro',
  base.$font-system-ui;

$font-sans-serif-k: 'Source Han Sans K';
$font-sans-serif-k-fallback: 'Noto Sans CJK KR', 'Apple SD Gothic Neo',
  base.$font-system-ui;

// 等宽字体
$font-monospace: 'Source Code Pro';
$font-monospace-fallback: 'Noto Mono', 'SF Mono', 'Roboto Mono';

$font-monospace-sc: 'Source Han Mono SC';
$font-monospace-sc-fallback: 'Noto Sans Mono CJK SC', $font-monospace,
  $font-monospace-fallback;

$font-monospace-tc: 'Source Han Mono TC';
$font-monospace-tc-fallback: 'Noto Sans Mono CJK TC', $font-monospace,
  $font-monospace-fallback;

$font-monospace-hc: 'Source Han Mono HC';
$font-monospace-hc-fallback: 'Noto Sans Mono CJK HC', $font-monospace-tc,
  $font-monospace-tc-fallback;

$font-monospace-j: 'Source Han Mono';
$font-monospace-j-fallback: 'Noto Sans Mono CJK JP', $font-monospace,
  $font-monospace-fallback;

$font-monospace-k: 'Source Han Mono K';
$font-monospace-k-fallback: 'Noto Sans Mono CJK KR', $font-monospace,
  $font-monospace-fallback;

/* 字体设定 */

// ✔️ 拉丁字母、西里尔字母、希腊文
// ❌ 阿拉伯字母、希伯来文、泰文

$vendor: 'adobe';
@-moz-document url-prefix() {
}

@include base.default-font-families(
  $font-sans-serif:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif,
        $font-sans-serif-fallback,
      )
    ),
  $font-monospace:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace,
        $font-monospace-fallback,
      )
    ),
  $font-sans-serif-sc:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif-sc,
        $font-sans-serif-sc-fallback,
      )
    ),
  $font-monospace-sc:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace-sc,
        $font-monospace-sc-fallback,
      )
    ),
  $font-sans-serif-tc:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif-tc,
        $font-sans-serif-tc-fallback,
      )
    ),
  $font-monospace-tc:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace-tc,
        $font-monospace-tc-fallback,
      )
    ),
  $font-sans-serif-hc:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif-hc,
        $font-sans-serif-hc-fallback,
      )
    ),
  $font-monospace-hc:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace-hc,
        $font-monospace-hc-fallback,
      )
    ),
  $font-sans-serif-j:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif-j,
        $font-sans-serif-j-fallback,
      )
    ),
  $font-monospace-j:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace-j,
        $font-monospace-j-fallback,
      )
    ),
  $font-sans-serif-k:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif-k,
        $font-sans-serif-k-fallback,
      )
    ),
  $font-monospace-k:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace-k,
        $font-monospace-k-fallback,
      )
    ),
  $vendor: $vendor
);

/* 字体替换 */

@include base.font-face-replace(
  $font-serif: $font-serif,
  $font-sans-serif: $font-sans-serif,
  $font-monospace: $font-monospace,
  $font-serif-sc: $font-sans-serif-sc,
  $font-sans-serif-sc: $font-sans-serif-sc,
  $font-serif-tc: $font-sans-serif-tc,
  $font-sans-serif-tc: $font-sans-serif-tc,
  $font-serif-hc: $font-sans-serif-hc,
  $font-sans-serif-hc: $font-sans-serif-hc,
  $font-serif-j: $font-sans-serif-j,
  $font-sans-serif-j: $font-sans-serif-j,
  $font-serif-k: $font-sans-serif-k,
  $font-sans-serif-k: $font-sans-serif-k
);

/* 特定网站适配 */

@include specific.websites(
  $font-serif:
    base.get-default(
      $generic: 'serif',
      $font-list: (
        $font-serif-sc,
        $font-serif-sc-fallback,
      )
    ),
  $font-sans-serif:
    base.get-default(
      $generic: 'sans-serif',
      $font-list: (
        $font-sans-serif-sc,
        $font-sans-serif-sc-fallback,
      )
    ),
  $font-monospace:
    base.get-default(
      $generic: 'monospace',
      $font-list: (
        $font-monospace-sc,
        $font-monospace-sc-fallback,
      )
    )
);

// 真的到底了
