Google เริ่มรองรับ Variable Fonts
(developers.google.com)การกำหนดมาสเตอร์สไตล์ไว้ไม่กี่แบบเพื่อลดขนาดฟอนต์บนเว็บ แล้วเพิ่มแกน (axis) เพื่อสร้างอินสแตนซ์ที่แตกแขนงออกมาได้หลายสิบแบบขึ้นไป
สามารถเลือกแต่ละ Variation ได้ผ่าน CSS
@supports (font-variation-settings: 'wdth' 200) {
@font-face {
/* https://github.com/TypeNetwork/Amstelvar */
font-family: AmstelvarAlpha;
src: url('../fonts/AmstelvarAlpha-VF.ttf');
font-weight: normal;
font-style: normal;
}
#font-amstelvar {
font-family: AmstelvarAlpha;
font-variation-settings: 'wdth' 400, 'wght' 98;
}
}
ยังไม่มีความคิดเห็น