Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(render): fix text rotate (#5909)
wpxp123456d509c3e67508
diff --git a/packages/engine-render/src/components/docs/extensions/font-and-base-line.ts b/packages/engine-render/src/components/docs/extensions/font-and-base-line.tsindex 6b8c290729..c22eae03a7 100644--- a/packages/engine-render/src/components/docs/extensions/font-and-base-line.ts+++ b/packages/engine-render/src/components/docs/extensions/font-and-base-line.ts@@ -65,14 +65,15 @@ export class FontAndBaseLine extends docExtension {const { spanPointWithFont = Vector2.create(0, 0) } = this.extensionOffset;- if (more) {- if (more.viewBound) {- // ctx.fillText('', x, y), the 'y' is the baseline of a character, not the left top of the character- if (spanPointWithFont.x > more.viewBound.right || spanPointWithFont.y - glyph.bBox.aba > more.viewBound.bottom) {- return;- }- }- }+ // I don't know what this code does. It affects the rendering of Rotate up. After commenting it out, it works normally.+ // if (more) {+ // if (more.viewBound) {+ // // ctx.fillText('', x, y), the 'y' is the baseline of a character, not the left top of the character+ // if (spanPointWithFont.x > more.viewBound.right || spanPointWithFont.y - glyph.bBox.aba > more.viewBound.bottom) {+ // return;+ // }+ // }+ // }if (content == null) {return;