diff --git a/packages/s2-core/src/cell/row-cell.ts b/packages/s2-core/src/cell/row-cell.ts index 03840d442b..5ae2898241 100644 --- a/packages/s2-core/src/cell/row-cell.ts +++ b/packages/s2-core/src/cell/row-cell.ts @@ -444,8 +444,8 @@ export class RowCell extends HeaderCell { const textArea = this.getTextArea(); const textStyle = this.getTextStyle(); const { cell, icon: iconStyle } = this.getStyle(); - const viewport = this.handleViewport(); + const textHeight = this.getActualTextHeight(); const { textStart } = adjustTextIconPositionWhileScrolling( viewport, @@ -456,7 +456,7 @@ export class RowCell extends HeaderCell { { align: normalizeTextAlign(textStyle.textBaseline!), size: { - textSize: textStyle.fontSize!, + textSize: textHeight, }, padding: { start: cell.padding.top, @@ -476,7 +476,7 @@ export class RowCell extends HeaderCell { const iconY = getVerticalIconPosition( iconStyle?.size!, textStart, - textStyle.fontSize!, + textHeight, textStyle.textBaseline!, );