/**
 * === Fonts for Traditional Chinese (zh-Hant) ===
 * also includes fallback for general Hong Kong (hk), Taiwan (tw),
 * as well as Malaysian Traditional Chinese (zh-Hant_MY)
 *
 * Website header: Child Fun Sans TC (fallback: Kavoon, fantasy)
 * Page headings: Maoken Assorted Sans TC (fallback: Dancing Script, cursive)
 * Main content: jf open huninn (fallback: Nunito Sans, sans-serif)
 * Note: Twemoji Mozilla must be one of fallback so that emoji would appear
 *
 * This file is written by Yaya MNH48 and licensed under MIT
 *
 */

/**
 * === Website header: Child Fun Sans TC ===
 *
 * Font is Copyright 2023-2026 Child Fun Sans Project Authors
 * (https://github.com/Des-Magmeta/ChildFunSans-TC)  
 * Copyright 2020 The Stick Project Authors
 * (https://github.com/fontworks-fonts/Stick)  
 * This Font Software is licensed under the SIL Open Font License, Version 1.1.  
 * 
 * The woff2 file loaded is compressed from the origin ttf file downloaded
 * from GitHub repository https://github.com/Des-Magmeta/ChildFunSans-TC
 * as at commit a2013a6, using the woff2_compress code that were built from
 * source as at the commit fb9c337 from https://github.com/google/woff2/
 *
 * CSS code below loads normal regular (weight 400) font
 * This font does not exist in italic font style.
 *
 */

@font-face {
  font-family: 'Child Fun Sans TC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ChildFunSansTC/web/ChildFunSansTC.woff2') format('woff2');
}

/**
 * === Page headings: Maoken Assorted Sans TC ===
 *
 * Font is Copyright (c) 2022-11-02, ZERO子 (https://github.com/Skr-ZERO),
 * with Reserved Font Name “Assorted”“什锦”.
 * Copyright (c) 2022-11-01, Umihotaru (https://umihotaru.work/)
 * This Font Software is licensed under the SIL Open Font License, Version 1.1.
 * 
 * The woff2 file loaded is compressed from the origin ttf file downloaded
 * from GitHub repository https://github.com/Skr-ZERO/MaokenAssortedSans-TC
 * as at commit 01b14a6, using the woff2_compress code that were built from
 * source as at the commit fb9c337 from https://github.com/google/woff2/
 *
 * CSS code below loads normal regular (weight 400) font
 * This font does not exist in italic font style.
 *
 */

@font-face {
  font-family: 'Maoken Assorted Sans TC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/MaokenAssortedSans-TC/web/MaokenAssortedSans-TC.woff2') format('woff2');
}

/**
 * === Main content: jf open huninn ===
 *
 * Font is Copyright (c) 2020-2024 The jf open huninn font is redistributed
 * by justfont Co., LTD., with Reserved Font Names 'open huninn' and 'huninn'.
 * under SIL Open Font License. The Hanzi part of this project was derived
 * from Kosugi Maru under Apache-2.0
 * (https://www.apache.org/licenses/LICENSE-2.0).
 * This Font Software is licensed under the SIL Open Font License, Version 1.1.
 * 
 * The woff2 file loaded is compressed from the origin ttf file downloaded
 * from GitHub repository https://github.com/justfont/open-huninn-font/
 * as at commit 98d53b3, using the woff2_compress code that were built from
 * source as at the commit fb9c337 from https://github.com/google/woff2/
 *
 * CSS code below loads normal regular (weight 400) font
 * This font does not exist in italic font style.
 *
 */

@font-face {
  font-family: 'jf open huninn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jf-openhuninn-2.1/web/jf-openhuninn-2.1.woff2') format('woff2');
}

/**
 * === Applies font to the theme ===
 *
 * These codes apply the font to the theme components when the language matches
 *
 * Order of the CSS codes:
 * - Set default font for everything
 * - Override font for page headings (h1, h2, h3, h4, h5)
 * - Override font for website header (.websitetitle and .webpagetitle)
 * - Override font for codes (code, kbd, samp, pre)
 *
 */

*:lang(zh-Hant), *:lang(hk), *:lang(tw), *:lang(zh-Hant_MY) {
  font-family: 'jf open huninn', 'Nunito Sans', 'Twemoji Mozilla', sans-serif;
  font-size: 18px;
}

h1:lang(zh-Hant), h1:lang(hk), h1:lang(tw), h1:lang(zh-Hant_MY),
h2:lang(zh-Hant), h2:lang(hk), h2:lang(tw), h2:lang(zh-Hant_MY),
h3:lang(zh-Hant), h3:lang(hk), h3:lang(tw), h3:lang(zh-Hant_MY),
h4:lang(zh-Hant), h4:lang(hk), h4:lang(tw), h4:lang(zh-Hant_MY),
h5:lang(zh-Hant), h5:lang(hk), h5:lang(tw), h5:lang(zh-Hant_MY) {
  font-family: 'Maoken Assorted Sans TC', 'Dancing Script', 'Twemoji Mozilla', cursive;
  font-weight: 400;
}

.websitetitle:lang(zh-Hant), .webpagetitle:lang(zh-Hant),
.websitetitle:lang(hk), .webpagetitle:lang(hk),
.websitetitle:lang(tw), .webpagetitle:lang(tw),
.websitetitle:lang(zh-Hant_MY), .webpagetitle:lang(zh-Hant_MY) {
  font-family: 'Child Fun Sans TC', 'Kavoon', 'Twemoji Mozilla', fantasy;
  font-weight: 400;
}

code:lang(zh-Hant), code:lang(hk), code:lang(tw), code:lang(zh-Hant_MY),
kbd:lang(zh-Hant), kbd:lang(hk), kbd:lang(tw), kbd:lang(zh-Hant_MY),
samp:lang(zh-Hant), samp:lang(hk), samp:lang(tw), samp:lang(zh-Hant_MY),
pre:lang(zh-Hant), pre:lang(hk), pre:lang(tw), pre:lang(zh-Hant_MY),
code *:lang(zh-Hant), code *:lang(hk), code *:lang(tw), code *:lang(zh-Hant_MY),
kbd *:lang(zh-Hant), kbd *:lang(hk), kbd *:lang(tw), kbd *:lang(zh-Hant_MY),
samp *:lang(zh-Hant), samp *:lang(hk), samp *:lang(tw), samp *:lang(zh-Hant_MY),
pre *:lang(zh-Hant), pre *:lang(hk), pre *:lang(tw), pre *:lang(zh-Hant_MY) {
  font-family: 'Fira Code', 'jf open huninn', 'Twemoji Mozilla', ui-monospace, monospace;
  font-size: 0.9em;
}
