normalizeUnicode

This optimisation can convert unicode-range descriptors to use the shorter wildcard ranges when a particular value meets the wildcard criteria. Values will be converted when the code matches 0 & f in the same place on both sides of the range. So, u+2000-2fff can be converted to u+2???, but u+2100-2fff will be left as it is.

@font-face {
    font-family: "Latin Extended Additional";
    unicode-range: u+1e00-1eff;
    src: local("Baskerville");
}

body {
    font-family: "Latin Extended Additional", sans-serif;
}
@font-face {
    font-family: "Latin Extended Additional";
    unicode-range: u+1e??;
    src: local("Baskerville");
}

body {
    font-family: "Latin Extended Additional", sans-serif;
}

View on GitHub

Did you know...

The syntax for unicode-range can be confusing at times; it's not always clear from reading the value what the descriptor is actually doing. However, this can be remedied by using postcss-unicode-characters, which allows you to write using a more descriptive syntax.

The above example, using the Latin Extended Additional range, can be expressed using this plugin by the following:

@font-face {
    font-family: "Latin Extended Additional";
    unicode-characters: script("Latin Extended Additional");
    src: local("Baskerville");
}

body {
    font-family: "Latin Extended Additional", sans-serif;
}
@font-face {
    font-family: "Latin Extended Additional";
    unicode-range: u+1e00-1eff;
    src: local("Baskerville");
}

body {
    font-family: "Latin Extended Additional", sans-serif;
}