/**
 * === Fonts for Simplified Chinese (zh-Hans) ===
 * also includes fallback for general Chinese (zh), China (cn),
 * as well as Malaysian Simplified Chinese (zh-Hans_MY)
 *
 * Website header: Liu Jian Mao Cao (fallback: Kavoon, fantasy)
 * Page headings: Ma Shan Zheng (fallback: Dancing Script, cursive)
 * Main content: ZCOOL XiaoWei (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: Liu Jian Mao Cao ===
 *
 * Font is Copyright 2018 The Liu Jian Mao Cao Project Authors
 * (https://www.github.com/googlefonts/liujianmaocao)
 * 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/googlefonts/liujianmaocao/
 * as at commit fc46ef0, 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: 'Liu Jian Mao Cao';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/LiuJianMaoCao/web/LiuJianMaoCao-Regular.woff2') format('woff2');
}

/**
 * === Page headings: Ma Shan Zheng ===
 *
 * Font is Copyright 2018 The Ma Shan Zheng Project Authors
 * (https://github.com/googlefonts/mashanzheng)
 * 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/googlefonts/mashanzheng/
 * as at commit 75b438a, 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: 'Ma Shan Zheng';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/MaShanZheng/web/MaShanZheng-Regular.woff2') format('woff2');
}

/**
 * === Main content: ZCOOL XiaoWei ===
 *
 * Font is Copyright 2018 The Xiaowei Project Authors
 * (https://www.github.com/googlefonts/xiaowei)
 * 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/googlefonts/zcool-xiaowei/
 * as at commit e94fc01, 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: 'ZCOOL XiaoWei';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ZCOOLXiaoWei/web/ZCOOLXiaoWei-Regular.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-Hans), *:lang(zh), *:lang(cn), *:lang(zh-Hans_MY) {
  font-family: 'ZCOOL XiaoWei', 'Nunito Sans', 'Twemoji Mozilla', sans-serif;
  font-size: 18px;
}

h1:lang(zh-Hans), h1:lang(zh), h1:lang(cn), h1:lang(zh-Hans_MY),
h2:lang(zh-Hans), h2:lang(zh), h2:lang(cn), h2:lang(zh-Hans_MY),
h3:lang(zh-Hans), h3:lang(zh), h3:lang(cn), h3:lang(zh-Hans_MY),
h4:lang(zh-Hans), h4:lang(zh), h4:lang(cn), h4:lang(zh-Hans_MY),
h5:lang(zh-Hans), h5:lang(zh), h5:lang(cn), h5:lang(zh-Hans_MY) {
  font-family: 'Ma Shan Zheng', 'Dancing Script', 'Twemoji Mozilla', cursive;
  font-weight: 400;
}

.websitetitle:lang(zh-Hans), .webpagetitle:lang(zh-Hans),
.websitetitle:lang(zh), .webpagetitle:lang(zh),
.websitetitle:lang(cn), .webpagetitle:lang(cn),
.websitetitle:lang(zh-Hans_MY), .webpagetitle:lang(zh-Hans_MY) {
  font-family: 'Liu Jian Mao Cao', 'Kavoon', 'Twemoji Mozilla', fantasy;
  font-weight: 400;
}

code:lang(zh-Hans), code:lang(zh), code:lang(cn), code:lang(zh-Hans_MY),
kbd:lang(zh-Hans), kbd:lang(zh), kbd:lang(cn), kbd:lang(zh-Hans_MY),
samp:lang(zh-Hans), samp:lang(zh), samp:lang(cn), samp:lang(zh-Hans_MY),
pre:lang(zh-Hans), pre:lang(zh), pre:lang(cn), pre:lang(zh-Hans_MY),
code *:lang(zh-Hans), code *:lang(zh), code *:lang(cn), code *:lang(zh-Hans_MY),
kbd *:lang(zh-Hans), kbd *:lang(zh), kbd *:lang(cn), kbd *:lang(zh-Hans_MY),
samp *:lang(zh-Hans), samp *:lang(zh), samp *:lang(cn), samp *:lang(zh-Hans_MY),
pre *:lang(zh-Hans), pre *:lang(zh), pre *:lang(cn), pre *:lang(zh-Hans_MY) {
  font-family: 'Fira Code', 'ZCOOL XiaoWei', 'Twemoji Mozilla', ui-monospace, monospace;
  font-size: 0.9em;
}
