From affd1911552a73a2b63a13f2c423121637830b99 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Thu, 4 Jul 2024 21:52:46 +0800 Subject: [PATCH] feat: add render mode #667 --- docs/en/guide/option.md | 1 + docs/guide/option.md | 1 + index.html | 9 ++++----- src/editor/core/draw/particle/TextParticle.ts | 11 ++++++++++- src/editor/dataset/enum/Editor.ts | 5 +++++ src/editor/index.ts | 4 +++- src/editor/interface/Editor.ts | 2 ++ src/editor/utils/option.ts | 2 ++ 8 files changed, 28 insertions(+), 7 deletions(-) diff --git a/docs/en/guide/option.md b/docs/en/guide/option.md index ff76b45..1b27863 100644 --- a/docs/en/guide/option.md +++ b/docs/en/guide/option.md @@ -43,6 +43,7 @@ interface IEditorOption { marginIndicatorColor?: string // The margin indicator color. default: #BABABA margins?: IMargin // Page margins. default: [100, 120, 100, 120] pageMode?: PageMode // Paper mode: Linkage, Pagination. default: Pagination + renderMode?: RenderMode // Render mode: speed(multi words combination rendering), compatibility(word by word rendering:avoid environmental differences such as browse,fonts...). default: speed defaultHyperlinkColor?: string // Default hyperlink color. default: #0000FF table?: ITableOption // table configuration {tdPadding?:IPadding; defaultTrMinHeight?:number; defaultColMinWidth?:number} header?: IHeader // Header information.{top?:number; maxHeightRadio?:MaxHeightRatio;} diff --git a/docs/guide/option.md b/docs/guide/option.md index 3ec3abb..b3158e7 100644 --- a/docs/guide/option.md +++ b/docs/guide/option.md @@ -43,6 +43,7 @@ interface IEditorOption { marginIndicatorColor?: string // 页边距指示器颜色。默认:#BABABA margins?: IMargin // 页面边距。默认:[100, 120, 100, 120] pageMode?: PageMode // 纸张模式:连页、分页。默认:分页 + renderMode?: RenderMode // 渲染模式:极速(多个字组合渲染)、兼容(逐字渲染:避免浏览器字体等环境差异)。默认:极速 defaultHyperlinkColor?: string // 默认超链接颜色。默认:#0000FF table?: ITableOption // 表格配置。{tdPadding?:IPadding; defaultTrMinHeight?:number; defaultColMinWidth?:number} header?: IHeader // 页眉信息。{top?:number; maxHeightRadio?:MaxHeightRatio;} diff --git a/index.html b/index.html index 1b4fbad..e3d64ce 100644 --- a/index.html +++ b/index.html @@ -32,11 +32,10 @@