MediaWiki:Common.less/fonts.less

From Old School RuneScape Wiki
Jump to: navigation, search
// <pre>
/* ==================================================
       Fonts licensed under Open Font License 1.1.
       This license is available with a FAQ at:
       <https://scripts.sil.org/OFL>
   ================================================== */

// <https://github.com/IBM/plex/releases/tag/v5.1.3> IBM Plex Sans
@font-face {
    font-family: 'IBM Plex Sans';
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    src: url('filepath://IBMPlexSans-Regular.woff') format('woff');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-weight: normal;
    font-style: italic;
    font-display: swap;
    src: url('filepath://IBMPlexSans-Italic.woff') format('woff');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-weight: bold;
    font-style: normal;
    font-display: swap;
    src: url('filepath://IBMPlexSans-Bold.woff') format('woff');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-weight: bold;
    font-style: italic;
    font-display: swap;
    src: url('filepath://IBMPlexSans-BoldItalic.woff') format('woff');
}

// <https://www.paratype.com/fonts/pt/pt-serif?tab=packages> PT Serif
@font-face {
    font-family: 'PT Serif';
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    src: url('filepath://PT-Serif_Regular.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-weight: normal;
    font-style: italic;
    font-display: swap;
    src: url('filepath://PT-Serif_Italic.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-weight: bold;
    font-style: normal;
    font-display: swap;
    src: url('filepath://PT-Serif_Bold.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-weight: bold;
    font-style: italic;
    font-display: swap;
    src: url('filepath://PT-Serif_Bold-Italic.woff') format('woff');
}

/* ==========================
      RuneScape fonts
   ========================== */

/*

  The order of defining the sources is as follows:

  1) the local filename
  2) the .woff2 file (if we use it in the future; none as of 12 Feb 2020)
  3) the .woff file

  From CSS Fonts Level 3, section 4.3: <https://www.w3.org/TR/css-fonts-3/#src-desc>

  "When a font is needed the user agent iterates over the set of references listed,
  using the first one it can successfully activate. Fonts containing invalid data
  or local font faces that are not found are ignored and the user agent loads
  the next font in the list."

*/

@font-face {
    font-family: 'RuneScape';
    font-style: normal;
    font-weight: normal;
    src: local("RuneScape Plain 12"),
         url('filepath://RuneScape.woff') format('woff');
}

@font-face {
    font-family: 'RuneScape';
    font-style: normal;
    font-weight: bold;
    src: local("RuneScape Bold"),
         local("RuneScape Bold 12"),
         local("RuneScape Chat 2"),
         local("RuneScape Chat"),
         url('filepath://RuneScape_Bold.woff') format('woff');
}

@font-face {
    font-family: 'RuneScape Small';
    font-style: normal;
    font-weight: normal;
    src: local("RuneScape Plain 12"),
         url('filepath://RuneScape_Small.woff') format('woff');
}

/* ******************
          body
   ****************** */

body {
    font-family: 'IBM Plex Sans','Helvetica Neue','Arial',sans-serif
}

#mw-content-text {
    line-height: 1.6em;
}

.mw-body-content {
	font-size: .9em;
	line-height: 1.8em;
}

.mw-body {
	color: @base-text-color;
}