在grape.js 庫中,加載時,如何在排版中添加自定義字體系列。我正在嘗試但找不到添加自定義字體的方法。任何添加自定義字體系列的人?
uj5u.com熱心網友回復:
這樣做的唯一方法是通過初始化物件添加它。不要指定任何字體系列,我只是更新它的名稱。
buildProps: ['font-family', ...],
properties:[
{ name: 'Font', property: 'font-family'},
...
默認字體取自它的 PropertyFactory,所以如果你想添加其他字體,你必須在初始化時宣告它們。
buildProps: ['font-family', ...],
properties:[
{
property: 'font-family',
name: 'Font',
list: [
{ name: 'Arial', value: 'Arial, Helvetica, sans-serif' }
...
]
},
...
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/493257.html
標籤:javascript 拉拉维尔 葡萄
