FontFace: thuộc tính descentOverride
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note: This feature is available in Web Workers.
Thuộc tính descentOverride của giao diện FontFace trả về và đặt giá trị của descriptor descent-override. Các giá trị có thể là normal (lấy chỉ số từ file font) hoặc một phần trăm.
Giá trị
Một chuỗi.
Ví dụ
js
let fontFace = new FontFace(
"Roboto",
'url("https://fonts.example.com/roboto.woff2")',
{ descentOverride: "90%" },
);
console.log(fontFace.descentOverride); // 90%
fontFace.descentOverride = "normal";
console.log(fontFace.descentOverride); // 'normal'
Thông số kỹ thuật
| Specification |
|---|
| CSS Font Loading Module Level 3> # dom-fontfacedescriptors-descentoverride> |