mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:53:44 +08:00
1 parent
d384527371
commit
7e3f2c468a
6 files changed
+59
-9
No files matched your search
@@ -4314,7 +4314,7 @@ async function beginCanvasText(index, box, surface, page) {
|
||||
const node = document.createElement("div");
|
||||
const item = { ...state.textDefaults, ...box, wrap: state.textDefaults.wrapOverride ?? box.wrap ?? state.textDefaults.wrap,
|
||||
index, page, surface, node, text: "", draft: true, fontData: data };
|
||||
const model = richTextModel(item);
|
||||
const model = { ...richTextModel(item), autoWidth: !box.wrap };
|
||||
const key = `temp-font-${crypto.randomUUID()}`;
|
||||
model.runs[0].format.font = key;
|
||||
canvasEditor.editText(item, face, null, { model, faces: new Map([[key, face]]), fonts: [{ key, data }] });
|
||||
|
||||
Reference in new issue
Block a user