在HTML5版本中无法自定义文本工具的转换比和字体。
var editor = new PhotoEditorSDK.UI.DesktopUI({
controlsOptions: {
transform: {
availableRatios: [
'imgly_transform_common_custom',
'imgly_transform_common_square',
'imgly_transform_common_4-3',
'imgly_transform_common_16-9'
]
},
text: {
replaceFonts: true,
fonts: [
{
fontFamily: 'Alegreya', // The font family name, defined by Google Fonts
variations: [
{
identifier: 'alegreya',
provider: 'google' // This loads the font from Google Fonts
}
]
}
]
}
}});
,但没有任何改变。请帮助。
发现了错误,控件必须在编辑器对象中。