在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
}
]
}
]
}
}});
但没有改变。请帮忙。
发现错误,controlsOptions必须在编辑器对象内。