diff --git a/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts b/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts index 28811ea02..376ca712c 100644 --- a/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts +++ b/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts @@ -139,6 +139,17 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number, js.push('}'); js.push('true;'); + // iOS doesn't automatically adjust the WebView's font size to match users' + // accessibility settings. To do this, we need to tell it to match the system font. + // See https://github.com/ionic-team/capacitor/issues/2748#issuecomment-612923135 + const iOSSpecificCss = ` + @media screen { + :root body { + font: -apple-system-body; + } + } + `; + html = ` @@ -146,6 +157,9 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
+ ${assetsToHeaders(result.pluginAssets, { asHtml: true })} diff --git a/packages/app-mobile/components/NoteEditor/CodeMirror/theme.ts b/packages/app-mobile/components/NoteEditor/CodeMirror/theme.ts index 7be933663..7678a1f55 100644 --- a/packages/app-mobile/components/NoteEditor/CodeMirror/theme.ts +++ b/packages/app-mobile/components/NoteEditor/CodeMirror/theme.ts @@ -30,11 +30,20 @@ const createTheme = (theme: any): Extension[] => { const baseGlobalStyle: Record