Make a Windows-1252 Variable Font Subset With Only R/I/B/BI Styles
Let’s assume you have a variable font with Latin, Greek, and Cyrillic letters, upright and italic styles and a large weight range.
You can use the subsetting function of Corretto to additionally produce a variable font only containing the Windows-1252 (Latin) character set, and a weight range from Regular to Bold, including italics.
In the YAML file, we first define an entry under the charsets
key with the unique ID win-1252
and a list of Unicode values in hexadecimal notation:
charsets:
- id: win-1252
unicodes:
- "000D"
- "0020"
- "0021"
- "0022"
- "0023"
- "0024"
- "0025"
- "0026"
- "0027"
- "0028"
- "0029"
- "002A"
- "002B"
- "002C"
- "002D"
- "002E"
- "002F"
- "0030"
- "0031"
- "0032"
- "0033"
- "0034"
- "0035"
- "0036"
- "0037"
- "0038"
- "0039"
- "003A"
- "003B"
- "003C"
- "003D"
- "003E"
- "003F"
- "0040"
- "0041"
- "0042"
- "0043"
- "0044"
- "0045"
- "0046"
- "0047"
- "0048"
- "0049"
- "004A"
- "004B"
- "004C"
- "004D"
- "004E"
- "004F"
- "0050"
- "0051"
- "0052"
- "0053"
- "0054"
- "0055"
- "0056"
- "0057"
- "0058"
- "0059"
- "005A"
- "005B"
- "005C"
- "005D"
- "005E"
- "005F"
- "0060"
- "0061"
- "0062"
- "0063"
- "0064"
- "0065"
- "0066"
- "0067"
- "0068"
- "0069"
- "006A"
- "006B"
- "006C"
- "006D"
- "006E"
- "006F"
- "0070"
- "0071"
- "0072"
- "0073"
- "0074"
- "0075"
- "0076"
- "0077"
- "0078"
- "0079"
- "007A"
- "007B"
- "007C"
- "007D"
- "007E"
- "00A0"
- "00A1"
- "00A2"
- "00A3"
- "00A4"
- "00A5"
- "00A6"
- "00A7"
- "00A8"
- "00A9"
- "00AA"
- "00AB"
- "00AC"
- "00AD"
- "00AE"
- "00AF"
- "00B0"
- "00B1"
- "00B2"
- "00B3"
- "00B4"
- "00B5"
- "00B6"
- "00B7"
- "00B8"
- "00B9"
- "00BA"
- "00BB"
- "00BC"
- "00BD"
- "00BE"
- "00BF"
- "00C0"
- "00C1"
- "00C2"
- "00C3"
- "00C4"
- "00C5"
- "00C6"
- "00C7"
- "00C8"
- "00C9"
- "00CA"
- "00CB"
- "00CC"
- "00CD"
- "00CE"
- "00CF"
- "00D0"
- "00D1"
- "00D2"
- "00D3"
- "00D4"
- "00D5"
- "00D6"
- "00D7"
- "00D8"
- "00D9"
- "00DA"
- "00DB"
- "00DC"
- "00DD"
- "00DE"
- "00DF"
- "00E0"
- "00E1"
- "00E2"
- "00E3"
- "00E4"
- "00E5"
- "00E6"
- "00E7"
- "00E8"
- "00E9"
- "00EA"
- "00EB"
- "00EC"
- "00ED"
- "00EE"
- "00EF"
- "00F0"
- "00F1"
- "00F2"
- "00F3"
- "00F4"
- "00F5"
- "00F6"
- "00F7"
- "00F8"
- "00F9"
- "00FA"
- "00FB"
- "00FC"
- "00FD"
- "00FE"
- "00FF"
- "0152"
- "0153"
- "0160"
- "0161"
- "0178"
- "017D"
- "017E"
- "0192"
- "02C6"
- "02DC"
- "2013"
- "2014"
- "2018"
- "2019"
- "201A"
- "201C"
- "201D"
- "201E"
- "2020"
- "2021"
- "2022"
- "2026"
- "2030"
- "2039"
- "203A"
- "20AC"
- "2122"
Then, under the ranges
key, we define how the variation axes will be modified.
-
ital
: The italic axis is kept as is. You could also omit this entry. -
wght
: The original range of the weight axis is 200 to 700, with Regular at 400 being the default master. We limit the weight axis range to 400 – 700 (Regular to Bold). The default master stays the same. -
YTDE
: The descender depth axis is removed from the font, because there are nomin
andmax
values given. It will be fixed at its former default value, -188.
ranges:
- id: ribbi
axes:
- tag: ital
- tag: wght
min: 400
def: 400
max: 700
- tag: YTDE
def: -188.0
And finally, under the subsets
key, we bring everything together in an entry referencing our range ID and charset ID. The family name is replaced with a new name, “Sudo Basic”. The modified fonts will be saved in the directory “Subset-Basic”. The directory will be created if necessary. The out_dir
directory path is relative to the export destination.
subsets:
- range: ribbi
charset: win-1252
family:
replace: Sudo Basic
out_dir: Subset-Basic
Download the full YAML file: win-1252-ribbi.corretto.yaml