feat(ios): new a11y properties for managing font scale (#10260)

This commit is contained in:
Dimitris-Rafail Katsampas
2023-04-06 02:20:15 +03:00
committed by GitHub
parent 2f9e5c0b84
commit 7aaa1d899d
11 changed files with 196 additions and 34 deletions

View File

@@ -582,13 +582,17 @@ export function test_setting_font_properties_sets_native_font() {
export function test_native_font_size_with_a11y_font_scale() {
if (isIOS) {
const page = helper.getCurrentPage();
const testView = new Label();
const deviceFontScaleMock = 4.0;
page.content = testView;
const page = helper.getCurrentPage();
const testView = new Label();
const layout = new StackLayout();
layout.addChild(testView);
testView.style._fontScale = deviceFontScaleMock;
page.content = layout;
layout.style.iosAccessibilityAdjustsFontSize = true;
layout.style.fontScaleInternal = deviceFontScaleMock;
const nativeFontSize = testView.nativeTextViewProtected.font.pointSize;
const expectedNativeFontSize = testView.style.fontInternal.fontSize * deviceFontScaleMock;