Compare commits

...

4 Commits

Author SHA1 Message Date
GitHub Actions
8b51d78db6 chore: bump version to 4.11.111 [skip ci] 2026-07-08 17:23:31 +00:00
e27ec9d7ab feat: add Android typography fix for Capacitor apps and integrate into ClientNonUIFeatures
All checks were successful
Build / increment-version (push) Successful in 6s
Build / build-android (push) Successful in 4m30s
Build / create-release (push) Successful in 14s
2026-07-09 03:23:22 +10:00
GitHub Actions
5c18e38314 chore: bump version to 4.11.110 [skip ci] 2026-07-08 16:43:01 +00:00
64e1de954a fix: update subproject commit reference in cinny to b425827
All checks were successful
Build / increment-version (push) Successful in 6s
Build / build-android (push) Successful in 4m12s
Build / create-release (push) Successful in 14s
2026-07-09 02:42:52 +10:00
5 changed files with 56 additions and 2 deletions

2
cinny

Submodule cinny updated: f67f08f1db...b4258278d8

View File

@@ -35,9 +35,11 @@ import {
isTauri,
isElectron,
isCapacitorNative,
applyAndroidTypographyFix,
sendNotification,
setupNotificationTapListener,
} from '../../utils/tauri';
import '../../styles/android-typography.css';
import { setPaarrotNavigate, initPaarrotAPI } from '../../paarrot-api';
import {
startBackgroundSync,
@@ -84,6 +86,14 @@ function EmojiStyleFeature() {
return null;
}
function AndroidTypographyFeature() {
useEffect(() => {
applyAndroidTypographyFix();
}, []);
return null;
}
function PageZoomFeature() {
const [pageZoom] = useSetting(settingsAtom, 'pageZoom');
@@ -684,6 +694,7 @@ export function ClientNonUIFeatures({ children }: ClientNonUIFeaturesProps) {
return (
<>
<EmojiStyleFeature />
<AndroidTypographyFeature />
<PageZoomFeature />
<FaviconUpdater />
<InviteNotifications />

View File

@@ -0,0 +1,8 @@
/*
* Android WebView renders Inter Variable with broken word/letter spacing.
* Applied when html.android-capacitor is set (see applyAndroidTypographyFix).
*/
html.android-capacitor body {
letter-spacing: normal;
word-spacing: normal;
}

View File

@@ -248,6 +248,41 @@ export const isAndroid = (): boolean => {
return ua.includes('android');
};
/** Returns true when running as a Capacitor app on Android. */
export const isCapacitorAndroid = (): boolean => {
if (typeof window === 'undefined') return false;
const cap = (window as { Capacitor?: { isNativePlatform?: () => boolean; getPlatform?: () => string } }).Capacitor;
return Boolean(cap?.isNativePlatform?.() && cap?.getPlatform?.() === 'android');
};
/**
* Android WebView mishandles Inter Variable — swap to static Inter / system fonts.
*/
export const applyAndroidTypographyFix = (): void => {
if (!isCapacitorAndroid()) return;
const root = document.documentElement;
root.classList.add('android-capacitor');
void (async () => {
try {
await import('@fontsource/inter/400.css');
await import('@fontsource/inter/500.css');
await import('@fontsource/inter/600.css');
root.style.setProperty(
'--font-secondary',
`'Inter', system-ui, Roboto, 'Noto Sans', var(--font-emoji), sans-serif`
);
} catch (err) {
console.warn('[applyAndroidTypographyFix] Falling back to system font:', err);
root.style.setProperty(
'--font-secondary',
`system-ui, Roboto, 'Noto Sans', var(--font-emoji), sans-serif`
);
}
})();
};
/**
* Apply safe area insets for mobile devices
* On Android, CSS env() may not work, so we apply fallback padding

View File

@@ -1,6 +1,6 @@
{
"name": "paarrot",
"version": "4.11.109",
"version": "4.11.111",
"description": "Paarrot - A Matrix client based on Cinny",
"engines": {
"node": ">=18.0.0"