File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
aztec/src/main/kotlin/org/wordpress/aztec/spans Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ open class AztecHeadingSpan(
8181
8282 var previousFontMetrics: Paint .FontMetricsInt ? = null
8383 var previousTextScale: Float = 1.0f
84+ var previousSpacing: Float? = null
8485
8586 enum class Heading constructor(internal val scale : Float , internal val tag : String ) {
8687 H1 (SCALE_H1 , " h1" ),
@@ -163,10 +164,11 @@ open class AztecHeadingSpan(
163164
164165 override fun updateMeasureState (textPaint : TextPaint ) {
165166 // when font size changes - reset cached font metrics to reapply vertical padding
166- if (previousTextScale != heading.scale) {
167+ if (previousTextScale != heading.scale || previousSpacing != textPaint.fontSpacing ) {
167168 previousFontMetrics = null
168169 }
169170 previousTextScale = heading.scale
171+ previousSpacing = textPaint.fontSpacing
170172
171173 textPaint.textSize * = heading.scale
172174 }
You can’t perform that action at this time.
0 commit comments