/* Fonts for use in Rnotes */

/* Sans-serif */
@font-face {
    font-family:'SourceSans';
    src:url('../../woff2/SourceSans.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

@font-face {
    font-family:'SourceSans';
    src:url('../../woff2/SourceSans-Italic.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:italic;
    font-display:swap;
}

/* Serif */
@font-face {
    font-family:'CrimsonPro';
    src:url('../../woff2/CrimsonPro.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

@font-face {
    font-family:'CrimsonPro';
    src:url('../../woff2/CrimsonPro-Italic.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:italic;
    font-display:swap;
}

/* Legibility-sans */
@font-face {
    font-family:'OpenSans';
    src:url('../../woff2/OpenSans.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

@font-face {
    font-family:'OpenSans';
    src:url('../../woff2/OpenSans-Italic.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:italic;
    font-display:swap;
}

/* Monospace */
@font-face {
    font-family:'JetBrainsMono';
    src:url('../../woff2/JetBrainsMono.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

@font-face {
    font-family:'JetBrainsMono';
    src:url('../../woff2/JetBrainsMono-Italic.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:italic;
    font-display:swap;
}

/* Handwriting */
@font-face {
    font-family:'PlaywriteGBS';
    src:url('../../woff2/PlaywriteGBS.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

@font-face {
    font-family:'PlaywriteGBS';
    src:url('../../woff2/PlaywriteGBS-Italic.woff2') format('woff2-variations'),
    font-weight:normal;
    font-style:italic;
    font-display:swap;
}


/* Devnotes:
 *
 * WOFF2 is prefferd bc it is compressed and thus loads faster, but 
 * you can keep TTF as a fallback bc Tauri uses the OS's native renderer
 * to transalte from WebKit, which might not support such a format.
 *
 * That's a nerdy way of saying WOFF2 is faster, only use TTF if you're
 * running Windows XP.
 *
 * The Fonts are selected by the WebView based off of what is requested 
 * (italic, bold etc.), and `font-display:swap` tells it to load the
 * fallbacks FIRST, then the preffered font once it's ready. */
