Wakamai-Fondue / wakamai-fondue-engine

The engine that powers Wakamai Fondue
Apache License 2.0
46 stars 9 forks source link

Create @font-face rule in CSS output #45

Closed RoelN closed 3 years ago

RoelN commented 3 years ago

The tests are not perfect, but at least will catch if the thing is broken.

Example output:

@font-face {
    font-family: "Gimlet Variable Regular";
    src: url("GimletVariable-VF.woff2");
    font-weight: 300 900;
    font-stretch: 64% 100%;
    unicode-range: U+0020-007E, U+00A0-0137, U+0139-0148, U+014A-017E,
        U+0192, U+0218-021B, U+0237, U+0259, U+02BB-02BC, U+02C6-02C7, U+02C9,
        U+02D8-02DD, U+0300-0304, U+0306-0308, U+030A-030C, U+0312,
        U+0326-0328, U+0394, U+03A9, U+03BC, U+03C0, U+1E80-1E85, U+1EF2-1EF3,
        U+2010-2015, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030,
        U+2032-2033, U+2039-203A, U+2044, U+2070, U+2074-2079, U+2080-2089,
        U+20AC, U+2116-2117, U+2122, U+2126, U+2190, U+2192, U+2202, U+2206,
        U+220F, U+2211-2212, U+2215, U+2219-221A, U+221E, U+222B, U+2248,
        U+2260, U+2264-2265, U+25CA, U+27B5, U+F6C3;
}
RoelN commented 3 years ago

Thanks again @pascalw. Merging this now, and added an issue for improved testing.