adds extra light weight to build system

This commit is contained in:
Rasmus Andersson 2018-12-27 18:44:26 -07:00
parent 9bb34a8fa6
commit 2b20e67cae
10 changed files with 300 additions and 9 deletions

View file

@ -31,6 +31,12 @@ Current font styles:
| Name | Weight class | Name | Weight class
| -------------------- | ---------------- | -------------------- | ----------------
| Thin | 100
| Thin Italic | 100
| Extra Light | 200
| Extra Light Italic | 200
| Light | 300
| Light Italic | 300
| Regular | 400 | Regular | 400
| Italic | 400 | Italic | 400
| Medium | 500 | Medium | 500

View file

@ -1,3 +1,48 @@
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 100;
src: url("font-files/Inter-UI-Thin.woff2?v=3.1") format("woff2"),
url("font-files/Inter-UI-Thin.woff?v=3.1") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-weight: 100;
src: url("font-files/Inter-UI-ThinItalic.woff2?v=3.1") format("woff2"),
url("font-files/Inter-UI-ThinItalic.woff?v=3.1") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 200;
src: url("font-files/Inter-UI-ExtraLight.woff2?v=3.1") format("woff2"),
url("font-files/Inter-UI-ExtraLight.woff?v=3.1") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-weight: 200;
src: url("font-files/Inter-UI-ExtraLightItalic.woff2?v=3.1") format("woff2"),
url("font-files/Inter-UI-ExtraLightItalic.woff?v=3.1") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 300;
src: url("font-files/Inter-UI-Light.woff2?v=3.1") format("woff2"),
url("font-files/Inter-UI-Light.woff?v=3.1") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-weight: 300;
src: url("font-files/Inter-UI-LightItalic.woff2?v=3.1") format("woff2"),
url("font-files/Inter-UI-LightItalic.woff?v=3.1") format("woff");
}
@font-face { @font-face {
font-family: 'Inter UI'; font-family: 'Inter UI';
font-style: normal; font-style: normal;
@ -110,7 +155,7 @@ BUGS:
*/ */
@font-face { @font-face {
font-family: 'Inter UI var'; font-family: 'Inter UI var';
font-weight: 400 900; font-weight: 100 900;
font-style: oblique 0deg 10deg; font-style: oblique 0deg 10deg;
src: url("font-files/Inter-UI.var.woff2?v=3.1") format("woff2-variations"), src: url("font-files/Inter-UI.var.woff2?v=3.1") format("woff2-variations"),
url("font-files/Inter-UI.var.woff2?v=3.1") format("woff2"); url("font-files/Inter-UI.var.woff2?v=3.1") format("woff2");
@ -129,7 +174,7 @@ BUGS:
*/ */
@font-face { @font-face {
font-family: 'Inter UI var alt'; font-family: 'Inter UI var alt';
font-weight: 400 900; font-weight: 100 900;
font-style: normal; font-style: normal;
font-named-instance: 'Regular'; font-named-instance: 'Regular';
src: url("font-files/Inter-UI-upright.var.woff2?v=3.1") format("woff2 supports variations(gvar)"), src: url("font-files/Inter-UI-upright.var.woff2?v=3.1") format("woff2 supports variations(gvar)"),
@ -138,7 +183,7 @@ BUGS:
} }
@font-face { @font-face {
font-family: 'Inter UI var alt'; font-family: 'Inter UI var alt';
font-weight: 400 900; font-weight: 100 900;
font-style: italic; font-style: italic;
font-named-instance: 'Italic'; font-named-instance: 'Italic';
src: url("font-files/Inter-UI-italic.var.woff2?v=3.1") format("woff2 supports variations(gvar)"), src: url("font-files/Inter-UI-italic.var.woff2?v=3.1") format("woff2 supports variations(gvar)"),

View file

@ -1014,6 +1014,23 @@ for (const ch of uniqueChars) {
url("fonts/const/Inter-UI-ThinItalic.woff") format("woff"); url("fonts/const/Inter-UI-ThinItalic.woff") format("woff");
} }
@font-face {
font-family: 'Inter-UI-VERSION';
font-style: normal;
font-weight: 200;
font-display: auto;
src: url("fonts/const/Inter-UI-ExtraLight.woff2") format("woff2"),
url("fonts/const/Inter-UI-ExtraLight.woff") format("woff");
}
@font-face {
font-family: 'Inter-UI-VERSION';
font-style: italic;
font-weight: 200;
font-display: auto;
src: url("fonts/const/Inter-UI-ExtraLightItalic.woff2") format("woff2"),
url("fonts/const/Inter-UI-ExtraLightItalic.woff") format("woff");
}
@font-face { @font-face {
font-family: 'Inter-UI-VERSION'; font-family: 'Inter-UI-VERSION';
font-style: normal; font-style: normal;
@ -1314,6 +1331,7 @@ document.head.appendChild(fontCSS)
<label class="style"> <label class="style">
<select name="weight" style="max-width:100px"> <select name="weight" style="max-width:100px">
<option value="100">Thin (100)</option> <option value="100">Thin (100)</option>
<option value="200">Extra Light (200)</option>
<option value="300">Light (300)</option> <option value="300">Light (300)</option>
<option value="400" selected>Regular (400)</option> <option value="400" selected>Regular (400)</option>
<option value="500">Medium (500)</option> <option value="500">Medium (500)</option>

View file

@ -316,6 +316,8 @@ else
derived_styles=( \ derived_styles=( \
"Light : Thin Regular" \ "Light : Thin Regular" \
"LightItalic : ThinItalic Italic" \ "LightItalic : ThinItalic Italic" \
"ExtraLight : Thin Regular" \
"ExtraLightItalic : ThinItalic Italic" \
"Medium : Regular Black" \ "Medium : Regular Black" \
"MediumItalic : Italic BlackItalic" \ "MediumItalic : Italic BlackItalic" \
"SemiBold : Regular Black" \ "SemiBold : Regular Black" \

View file

@ -1,3 +1,48 @@
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 100;
src: url("Inter-UI-Thin.woff2") format("woff2"),
url("Inter-UI-Thin.woff") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-weight: 100;
src: url("Inter-UI-ThinItalic.woff2") format("woff2"),
url("Inter-UI-ThinItalic.woff") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 200;
src: url("Inter-UI-ExtraLight.woff2") format("woff2"),
url("Inter-UI-ExtraLight.woff") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-weight: 200;
src: url("Inter-UI-ExtraLightItalic.woff2") format("woff2"),
url("Inter-UI-ExtraLightItalic.woff") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 300;
src: url("Inter-UI-Light.woff2") format("woff2"),
url("Inter-UI-Light.woff") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-weight: 300;
src: url("Inter-UI-LightItalic.woff2") format("woff2"),
url("Inter-UI-LightItalic.woff") format("woff");
}
@font-face { @font-face {
font-family: 'Inter UI'; font-family: 'Inter UI';
font-style: normal; font-style: normal;
@ -110,7 +155,7 @@ BUGS:
*/ */
@font-face { @font-face {
font-family: 'Inter UI var'; font-family: 'Inter UI var';
font-weight: 400 900; font-weight: 100 900;
font-style: oblique 0deg 10deg; font-style: oblique 0deg 10deg;
src: url("Inter-UI.var.woff2") format("woff2-variations"), src: url("Inter-UI.var.woff2") format("woff2-variations"),
url("Inter-UI.var.woff2") format("woff2"); url("Inter-UI.var.woff2") format("woff2");
@ -129,7 +174,7 @@ BUGS:
*/ */
@font-face { @font-face {
font-family: 'Inter UI var alt'; font-family: 'Inter UI var alt';
font-weight: 400 900; font-weight: 100 900;
font-style: normal; font-style: normal;
font-named-instance: 'Regular'; font-named-instance: 'Regular';
src: url("Inter-UI-upright.var.woff2") format("woff2 supports variations(gvar)"), src: url("Inter-UI-upright.var.woff2") format("woff2 supports variations(gvar)"),
@ -138,7 +183,7 @@ BUGS:
} }
@font-face { @font-face {
font-family: 'Inter UI var alt'; font-family: 'Inter UI var alt';
font-weight: 400 900; font-weight: 100 900;
font-style: italic; font-style: italic;
font-named-instance: 'Italic'; font-named-instance: 'Italic';
src: url("Inter-UI-italic.var.woff2") format("woff2 supports variations(gvar)"), src: url("Inter-UI-italic.var.woff2") format("woff2 supports variations(gvar)"),

View file

@ -458,9 +458,10 @@ class Main(object):
).strip() ).strip()
# Note: ots-sanitize does not exit with an error in many cases where # Note: ots-sanitize does not exit with an error in many cases where
# it fails to sanitize the font. # it fails to sanitize the font.
success = otssan_res.find('Failed') == -1 success = str(otssan_res).find('Failed') == -1
except: except:
success = False success = False
if len(otssan_res) == 0:
otssan_res = 'error' otssan_res = 'error'
if success: if success:
@ -745,7 +746,7 @@ class Main(object):
).strip() ).strip()
# Note: ots-idempotent does not exit with an error in many cases where # Note: ots-idempotent does not exit with an error in many cases where
# it fails to sanitize the font. # it fails to sanitize the font.
if res.find('Failed') != -1: if str(res).find('Failed') != -1:
log.error('[checkfont] ots-idempotent failed for %r: %s' % ( log.error('[checkfont] ots-idempotent failed for %r: %s' % (
fontfile, res)) fontfile, res))
return False return False

View file

@ -58,6 +58,35 @@
</dict> </dict>
</lib> </lib>
</instance> </instance>
<instance name="extralightitalic" familyname="Inter UI" stylename="Extra Light Italic" filename="../build/ufo/Inter-UI-ExtraLightItalic.ufo" stylemapfamilyname="Inter UI Extra Light" stylemapstylename="italic">
<location>
<dimension name="Weight" xvalue="200"/>
</location>
<kerning/>
<info/>
<lib>
<dict>
<key>com.schriftgestaltung.customParameters</key>
<array>
<array>
<string>panose</string>
<array>
<integer>2</integer>
<integer>11</integer>
<integer>3</integer>
<integer>2</integer>
<integer>3</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>4</integer>
</array>
</array>
</array>
</dict>
</lib>
</instance>
<instance name="lightitalic" familyname="Inter UI" stylename="Light Italic" filename="../build/ufo/Inter-UI-LightItalic.ufo" stylemapfamilyname="Inter UI Light" stylemapstylename="italic"> <instance name="lightitalic" familyname="Inter UI" stylename="Light Italic" filename="../build/ufo/Inter-UI-LightItalic.ufo" stylemapfamilyname="Inter UI Light" stylemapstylename="italic">
<location> <location>
<dimension name="Weight" xvalue="300"/> <dimension name="Weight" xvalue="300"/>

View file

@ -54,6 +54,35 @@
</dict> </dict>
</lib> </lib>
</instance> </instance>
<instance name="extralight" familyname="Inter UI" stylename="Extra Light" filename="../build/ufo/Inter-UI-ExtraLight.ufo" stylemapfamilyname="Inter UI Extra Light" stylemapstylename="regular">
<location>
<dimension name="Weight" xvalue="200"/>
</location>
<kerning/>
<info/>
<lib>
<dict>
<key>com.schriftgestaltung.customParameters</key>
<array>
<array>
<string>panose</string>
<array>
<integer>2</integer>
<integer>11</integer>
<integer>3</integer>
<integer>2</integer>
<integer>3</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>4</integer>
</array>
</array>
</array>
</dict>
</lib>
</instance>
<instance name="light" familyname="Inter UI" stylename="Light" filename="../build/ufo/Inter-UI-Light.ufo" stylemapfamilyname="Inter UI Light" stylemapstylename="regular"> <instance name="light" familyname="Inter UI" stylename="Light" filename="../build/ufo/Inter-UI-Light.ufo" stylemapfamilyname="Inter UI Light" stylemapstylename="regular">
<location> <location>
<dimension name="Weight" xvalue="300"/> <dimension name="Weight" xvalue="300"/>

View file

@ -111,6 +111,66 @@
</dict> </dict>
</lib> </lib>
</instance> </instance>
<instance name="extralight" familyname="Inter UI" stylename="Extra Light" filename="../build/ufo/Inter-UI-ExtraLight.ufo" stylemapfamilyname="Inter UI Extra Light" stylemapstylename="regular">
<location>
<dimension name="Weight" xvalue="200"/>
<dimension name="Slant" xvalue="0"/>
</location>
<kerning/>
<info/>
<lib>
<dict>
<key>com.schriftgestaltung.customParameters</key>
<array>
<array>
<string>panose</string>
<array>
<integer>2</integer>
<integer>11</integer>
<integer>3</integer>
<integer>2</integer>
<integer>3</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>4</integer>
</array>
</array>
</array>
</dict>
</lib>
</instance>
<instance name="extralightitalic" familyname="Inter UI" stylename="Extra Light Italic" filename="../build/ufo/Inter-UI-ExtraLightItalic.ufo" stylemapfamilyname="Inter UI Extra Light" stylemapstylename="italic">
<location>
<dimension name="Weight" xvalue="200"/>
<dimension name="Slant" xvalue="10"/>
</location>
<kerning/>
<info/>
<lib>
<dict>
<key>com.schriftgestaltung.customParameters</key>
<array>
<array>
<string>panose</string>
<array>
<integer>2</integer>
<integer>11</integer>
<integer>3</integer>
<integer>2</integer>
<integer>3</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>4</integer>
</array>
</array>
</array>
</dict>
</lib>
</instance>
<instance name="light" familyname="Inter UI" stylename="Light" filename="../build/ufo/Inter-UI-Light.ufo" stylemapfamilyname="Inter UI Light" stylemapstylename="regular"> <instance name="light" familyname="Inter UI" stylename="Light" filename="../build/ufo/Inter-UI-Light.ufo" stylemapfamilyname="Inter UI Light" stylemapstylename="regular">
<location> <location>
<dimension name="Weight" xvalue="300"/> <dimension name="Weight" xvalue="300"/>

View file

@ -578601,6 +578601,62 @@ name = panose;
value = ( value = (
2, 2,
11, 11,
3,
2,
3,
0,
0,
0,
0,
4
);
}
);
interpolationWeight = 200;
interpolationWidth = 0;
instanceInterpolations = {
"B1F27B51-9973-4381-9301-4FE46FE1CA59" = 0.66667;
"C698F293-3EC0-4A5A-A3A0-0FDB1F5CF265" = 0.33333;
};
name = "Extra Light";
weightClass = ExtraLight;
},
{
customParameters = (
{
name = panose;
value = (
2,
11,
3,
2,
3,
0,
0,
0,
0,
4
);
}
);
interpolationWeight = 200;
interpolationWidth = 10;
instanceInterpolations = {
"11F4534A-B963-4AB5-820F-DAF9A20CD933" = 0.33333;
"200BE2C5-40F6-4CF4-AF4F-A33C0CC0964F" = 0.66667;
};
isItalic = 1;
linkStyle = "Extra Light";
name = "Extra Light Italic";
weightClass = ExtraLight;
},
{
customParameters = (
{
name = panose;
value = (
2,
11,
4, 4,
2, 2,
3, 3,