diff --git a/packages/core/ui/styling/font.android.ts b/packages/core/ui/styling/font.android.ts index bb6a308e24..6e5a71c09a 100644 --- a/packages/core/ui/styling/font.android.ts +++ b/packages/core/ui/styling/font.android.ts @@ -24,19 +24,19 @@ export class Font extends FontBase { } public withFontWeight(weight: FontWeightType): Font { - return new Font(this.fontFamily, this.fontSize, this.fontStyle, weight, 1, this.fontVariationSettings); + return new Font(this.fontFamily, this.fontSize, this.fontStyle, weight, this.fontScale, this.fontVariationSettings); } public withFontSize(size: number): Font { - return new Font(this.fontFamily, size, this.fontStyle, this.fontWeight, 1, this.fontVariationSettings); + return new Font(this.fontFamily, size, this.fontStyle, this.fontWeight, this.fontScale, this.fontVariationSettings); } public withFontScale(scale: number): Font { - return new Font(this.fontFamily, this.fontSize, this.fontStyle, this.fontWeight, 1, this.fontVariationSettings); + return new Font(this.fontFamily, this.fontSize, this.fontStyle, this.fontWeight, scale, this.fontVariationSettings); } public withFontVariationSettings(variationSettings: Array | null): Font { - return new Font(this.fontFamily, this.fontSize, this.fontStyle, this.fontWeight, 1, variationSettings); + return new Font(this.fontFamily, this.fontSize, this.fontStyle, this.fontWeight, this.fontScale, variationSettings); } getAndroidTypeface(): android.graphics.Typeface { diff --git a/packages/core/ui/text-base/index.android.ts b/packages/core/ui/text-base/index.android.ts index 335c7d726b..e5d3061531 100644 --- a/packages/core/ui/text-base/index.android.ts +++ b/packages/core/ui/text-base/index.android.ts @@ -641,7 +641,7 @@ function setSpanModifiers(ssb: android.text.SpannableStringBuilder, span: Span, ssb.setSpan(typefaceSpan, start, end, android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); if (spanStyle.fontSize) { - ssb.setSpan(new android.text.style.AbsoluteSizeSpan(layout.toDevicePixels(spanStyle.fontSize)), start, end, android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + ssb.setSpan(new android.text.style.AbsoluteSizeSpan(layout.toDevicePixels(spanStyle.fontSize * (spanStyle.fontScaleInternal ?? 1))), start, end, android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } const color = spanStyle.color;