/**
 * === Fonts for Rejang Malay (ms-Rjng) ===
 * Everything: Noto Sans Rejang (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
 *
 */

/**
 * === Everything: Noto Sans Rejang ===
 *
 * Font is Copyright 2022 The Noto Project Authors
 * (https://github.com/notofonts/rejang)
 * 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 in the zip
 * file named `NotoSansRejang-v2.003.zip` released on GitHub repository
 * https://github.com/notofonts/rejang/ as at v2.003 at commit f8a0b6d,
 * from the `NotoSansRejang\full\ttf` directory of the zip, 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: 'Noto Sans Rejang';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/NotoSansRejang/web/NotoSansRejang-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(ms-Rjng) {
  font-family: 'Noto Sans Rejang', 'Nunito Sans', 'Twemoji Mozilla', sans-serif;
  font-size: 18px;
}

h1:lang(ms-Rjng), h2:lang(ms-Rjng), h3:lang(ms-Rjng), h4:lang(ms-Rjng), h5:lang(ms-Rjng) {
  font-family: 'Noto Sans Rejang', 'Dancing Script', 'Twemoji Mozilla', cursive;
  font-weight: 400;
}

.websitetitle:lang(ms-Rjng), .webpagetitle:lang(ms-Rjng) {
  font-family: 'Noto Sans Rejang', 'Kavoon', 'Twemoji Mozilla', fantasy;
  font-weight: 400;
}

code:lang(ms-Rjng), kbd:lang(ms-Rjng), samp:lang(ms-Rjng), pre:lang(ms-Rjng),
code *:lang(ms-Rjng), kbd *:lang(ms-Rjng), samp *:lang(ms-Rjng), pre *:lang(ms-Rjng) {
  font-family: 'Fira Code', 'Noto Sans Rejang', 'Twemoji Mozilla', ui-monospace, monospace;
  font-size: 0.9em;
}
