Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(mobile): Use the Yowza brand font (#2358)

Chad Piha942df2a3f72b
diff --git a/openwhispr-mobile/.gitignore b/openwhispr-mobile/.gitignore
index c59f99bf3..ab8810f6d 100644
--- a/openwhispr-mobile/.gitignore
+++ b/openwhispr-mobile/.gitignore
@@ -43,6 +43,9 @@ yarn-error.*
credentials/
credentials.json
+# Licensed Yowza brand font, fetched by `npm run download:brand-fonts`
+/assets/fonts/yowza/*.otf
+
.claude
.agents
diff --git a/openwhispr-mobile/CONTRIBUTING.md b/openwhispr-mobile/CONTRIBUTING.md
index ce44735b2..3099ed96d 100644
--- a/openwhispr-mobile/CONTRIBUTING.md
+++ b/openwhispr-mobile/CONTRIBUTING.md
@@ -43,6 +43,8 @@ Install the locked Ruby dependencies before the first iOS build:
bundle install
```
+The app's brand font, Yowza, is commercially licensed, so its files are not in the repository. `npm install` fetches them from a private release when your GitHub account has access (`npm run download:brand-fonts` fetches them again); without access the app uses Space Grotesk and works the same. The fonts are embedded when the native project is built, so rebuild with `npm run ios` after fetching them.
+
If you plan to build on a physical iOS device, configure a unique local identity and signing team first. See [Physical iOS Devices and Forks](#physical-ios-devices-and-forks).
## Development Workflow
diff --git a/openwhispr-mobile/app.config.js b/openwhispr-mobile/app.config.js
index c0540b559..a7e02ff2b 100644
--- a/openwhispr-mobile/app.config.js
+++ b/openwhispr-mobile/app.config.js
@@ -1,6 +1,17 @@
+const fs = require('fs');
+const path = require('path');
const baseConfig = require('./app.base.json');
const { resolveOpenWhisprEnvironment } = require('./config/openwhispr-environments');
+// Yowza is licensed, so the files are git-ignored and fetched by
+// `npm run download:brand-fonts`. They are embedded in the native binary (never
+// the JS bundle, so OTA updates don't carry them) and src/lib/fonts.ts falls
+// back to Space Grotesk when a build has none.
+const BRAND_FONTS = [
+ 'assets/fonts/yowza/yowza-std-regular.otf',
+ 'assets/fonts/yowza/yowza-soft-std-medium.otf',
+];
+
function unique(values) {
return [...new Set(values.filter(Boolean))];
}
@@ -81,6 +92,15 @@ function createEasExtensionConfig(existingExtra, environment) {
};
}
+function withBrandFonts(plugins) {
+ if (!BRAND_FONTS.every((font) => fs.existsSync(path.join(__dirname, font)))) return plugins;
+ // expo-font is a run-once plugin, so the fonts replace its bare entry; a
+ // second entry would be skipped.
+ return plugins.map((plugin) =>
+ plugin === 'expo-font' ? ['expo-font', { fonts: BRAND_FONTS }] : plugin,
+ );
+}
+
function createGoogleCalendarConfig(environment) {
const devClientId = firstNonEmpty(process.env.EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_CLIENT_ID_DEV);
const prodClientId = firstNonEmpty(process.env.EXPO_PUBLIC_GOOGLE_CALENDAR_IOS_CLIENT_ID);
@@ -125,6 +145,7 @@ module.exports = () => {
...expo.android,
package: environment.androidPackage,
},
+ plugins: withBrandFonts(expo.plugins),
extra: {
...expo.extra,
openWhispr: {
diff --git a/openwhispr-mobile/app/(tabs)/_layout.tsx b/openwhispr-mobile/app/(tabs)/_layout.tsx
index 450e513b0..3d0e1a42a 100644
--- a/openwhispr-mobile/app/(tabs)/_layout.tsx
+++ b/openwhispr-mobile/app/(tabs)/_layout.tsx
@@ -1,6 +1,7 @@
import { NativeTabs } from 'expo-router/unstable-native-tabs';
import { useSegments } from 'expo-router';
import { useHandoffStore } from '@/store/useHandoffStore';
+import { AppFont } from '@/lib/fonts';
// Static routes inside the (notes) stack — anything else under (notes) is the
// dynamic [id] editor route.
@@ -22,7 +23,11 @@ export default function TabsLayout() {
const handoffActive = useHandoffStore((s) => s.isActive);
return (
- <NativeTabs minimizeBehavior="onScrollDown" hidden={isNoteEditor || handoffActive}>
+ <NativeTabs
+ minimizeBehavior="onScrollDown"
+ hidden={isNoteEditor || handoffActive}
+ labelStyle={{ fontFamily: AppFont.medium }}
+ >
<NativeTabs.Trigger name="(record)">
<NativeTabs.Trigger.Label>Record</NativeTabs.Trigger.Label>
<NativeTabs.Trigger.Icon sf="mic.fill" />
diff --git a/openwhispr-mobile/eas.json b/openwhispr-mobile/eas.json
index f1269955d..424fdc193 100644
--- a/openwhispr-mobile/eas.json
+++ b/openwhispr-mobile/eas.json
@@ -23,6 +23,9 @@
"production": {
"autoIncrement": true,
"channel": "production",
+ "env": {
+ "BRAND_FONTS_REQUIRED": "1"
+ },
"ios": {
"image": "latest",
"resourceClass": "medium"
diff --git a/openwhispr-mobile/package.json b/openwhispr-mobile/package.json
index b42c200a8..aa57ae364 100644
--- a/openwhispr-mobile/package.json
+++ b/openwhispr-mobile/package.json
@@ -12,6 +12,7 @@
"prebuild:production": "OPENWHISPR_APP_ENV=production expo prebuild",
"web": "expo start --web",
"build:ios-return-map": "node scripts/build-ios-return-map.mjs",
+ "download:brand-fonts": "node ../scripts/download-brand-fonts.js --output-dir assets/fonts/yowza",
"format": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
@@ -22,7 +23,7 @@
"pretest": "npm rebuild better-sqlite3",
"test": "jest",
"test:watch": "jest --watch",
- "postinstall": "patch-package",
+ "postinstall": "patch-package && npm run download:brand-fonts",
"eas-build-pre-install": "bundle install"
},
"engines": {
diff --git a/openwhispr-mobile/src/components/features/AddSnippetSheet.tsx b/openwhispr-mobile/src/components/features/AddSnippetSheet.tsx
index 3f0697071..714ea8d8c 100644
--- a/openwhispr-mobile/src/components/features/AddSnippetSheet.tsx
+++ b/openwhispr-mobile/src/components/features/AddSnippetSheet.tsx
@@ -4,7 +4,7 @@ import { Text } from '@/components/ui/Text';
import { FormSheet } from '@/components/ui/FormSheet';
import { iosColor } from '@/config/colors';
import { confirmDestructive } from '@/lib/alerts';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { safeHaptics } from '@/lib/utils';
import type { Snippet } from '@/lib/snippets';
@@ -140,7 +140,7 @@ export function AddSnippetSheet({
const styles = StyleSheet.create({
input: {
color: LABEL_COLOR,
- fontFamily: SpaceGrotesk.regular,
+ fontFamily: AppFont.regular,
fontSize: 15,
fontWeight: '400',
},
diff --git a/openwhispr-mobile/src/components/features/AddWordsSheet.tsx b/openwhispr-mobile/src/components/features/AddWordsSheet.tsx
index 824aa7cc1..c98af0742 100644
--- a/openwhispr-mobile/src/components/features/AddWordsSheet.tsx
+++ b/openwhispr-mobile/src/components/features/AddWordsSheet.tsx
@@ -4,7 +4,7 @@ import { Text } from '@/components/ui/Text';
import { FormSheet } from '@/components/ui/FormSheet';
import { SystemIcon } from '@/components/ui/SystemIcon';
import { iosColor } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { safeHaptics } from '@/lib/utils';
const LABEL_COLOR = iosColor('label');
@@ -143,7 +143,7 @@ export function AddWordsSheet({ visible, onClose, onSubmit }: Props) {
const styles = StyleSheet.create({
input: {
color: LABEL_COLOR,
- fontFamily: SpaceGrotesk.regular,
+ fontFamily: AppFont.regular,
fontSize: 15,
fontWeight: '400',
},
diff --git a/openwhispr-mobile/src/components/features/AnimatedSplash.tsx b/openwhispr-mobile/src/components/features/AnimatedSplash.tsx
index 160bd303f..239e4669d 100644
--- a/openwhispr-mobile/src/components/features/AnimatedSplash.tsx
+++ b/openwhispr-mobile/src/components/features/AnimatedSplash.tsx
@@ -12,7 +12,7 @@ import Animated, {
import * as SplashScreen from 'expo-splash-screen';
import { LinearGradient } from 'expo-linear-gradient';
import { BRAND_GRADIENT } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
const LOGO_SIZE = 120;
const RING_THICKNESS = 6;
@@ -182,7 +182,7 @@ const styles = StyleSheet.create({
},
wordmark: {
marginTop: 24,
- fontFamily: SpaceGrotesk.semibold,
+ fontFamily: AppFont.semibold,
fontSize: 24,
fontWeight: '600',
letterSpacing: 1,
diff --git a/openwhispr-mobile/src/components/notes/MarkdownRenderer.tsx b/openwhispr-mobile/src/components/notes/MarkdownRenderer.tsx
index 60031e7b5..ea1239b54 100644
--- a/openwhispr-mobile/src/components/notes/MarkdownRenderer.tsx
+++ b/openwhispr-mobile/src/components/notes/MarkdownRenderer.tsx
@@ -122,6 +122,7 @@ export function MarkdownRenderer({ content, selectable = false }: MarkdownRender
return (
<Text
key={i}
+ accessibilityRole="header"
selectable={selectable}
style={{
fontSize: 22,
@@ -140,6 +141,7 @@ export function MarkdownRenderer({ content, selectable = false }: MarkdownRender
return (
<Text
key={i}
+ accessibilityRole="header"
selectable={selectable}
style={{
fontSize: 18,
@@ -158,6 +160,7 @@ export function MarkdownRenderer({ content, selectable = false }: MarkdownRender
return (
<Text
key={i}
+ accessibilityRole="header"
selectable={selectable}
style={{
fontSize: 16,
diff --git a/openwhispr-mobile/src/components/notes/MoveToFolderSheet.tsx b/openwhispr-mobile/src/components/notes/MoveToFolderSheet.tsx
index ae1f07858..69a848a1c 100644
--- a/openwhispr-mobile/src/components/notes/MoveToFolderSheet.tsx
+++ b/openwhispr-mobile/src/components/notes/MoveToFolderSheet.tsx
@@ -76,7 +76,9 @@ export function MoveToFolderSheet({
>
<View className="flex-1 bg-systemBackground">
<View className="flex-row items-center justify-between px-6 pb-4 pt-8">
- <Text className="text-[22px] font-bold text-label">{title}</Text>
+ <Text accessibilityRole="header" className="text-[22px] font-bold text-label">
+ {title}
+ </Text>
<GlassIconButton onPress={onClose} accessibilityLabel="Close">
<SystemIcon name="xmark" mdName="X" size={15} color="secondaryLabel" />
</GlassIconButton>
diff --git a/openwhispr-mobile/src/components/notes/NewFolderSheet.tsx b/openwhispr-mobile/src/components/notes/NewFolderSheet.tsx
index 6fd01e166..5496c72df 100644
--- a/openwhispr-mobile/src/components/notes/NewFolderSheet.tsx
+++ b/openwhispr-mobile/src/components/notes/NewFolderSheet.tsx
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
import { PlatformColor, TextInput } from 'react-native';
import { FormSheet } from '@/components/ui/FormSheet';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { safeHaptics } from '@/lib/utils';
import { NOTES_BUTTON_RADIUS } from './tokens';
@@ -56,7 +56,7 @@ export function NewFolderSheet({ visible, onClose, onCreate }: NewFolderSheetPro
backgroundColor: PlatformColor('tertiarySystemFill') as unknown as string,
borderRadius: NOTES_BUTTON_RADIUS,
borderCurve: 'continuous',
- fontFamily: SpaceGrotesk.regular,
+ fontFamily: AppFont.regular,
}}
/>
</FormSheet>
diff --git a/openwhispr-mobile/src/components/notes/NoteChatSheet.tsx b/openwhispr-mobile/src/components/notes/NoteChatSheet.tsx
index c96216089..6d6eaa85b 100644
--- a/openwhispr-mobile/src/components/notes/NoteChatSheet.tsx
+++ b/openwhispr-mobile/src/components/notes/NoteChatSheet.tsx
@@ -90,7 +90,9 @@ export function NoteChatSheet({
<View className="mb-2 self-center h-1.5 w-9 rounded-full bg-quaternaryLabel" />
<View className="mb-3 flex-row items-center justify-between">
<View className="flex-1 pr-3">
- <Text className="text-[19px] font-bold text-label">Ask about this note</Text>
+ <Text accessibilityRole="header" className="text-[19px] font-bold text-label">
+ Ask about this note
+ </Text>
<Text className="mt-1 text-[13px] text-secondaryLabel">
Answers use only this note. This chat is temporary and won't be saved.
</Text>
diff --git a/openwhispr-mobile/src/components/notes/NotesTopBar.tsx b/openwhispr-mobile/src/components/notes/NotesTopBar.tsx
index 8bb832214..c6234580e 100644
--- a/openwhispr-mobile/src/components/notes/NotesTopBar.tsx
+++ b/openwhispr-mobile/src/components/notes/NotesTopBar.tsx
@@ -38,7 +38,11 @@ export function NotesTopBar({
{title && (
<View pointerEvents="none" className="absolute inset-0 items-center justify-center">
- <Text numberOfLines={1} className="text-[17px] font-semibold text-label">
+ <Text
+ accessibilityRole="header"
+ numberOfLines={1}
+ className="text-[17px] font-semibold text-label"
+ >
{title}
</Text>
</View>
diff --git a/openwhispr-mobile/src/components/notes/SpeakerCountPrompt.tsx b/openwhispr-mobile/src/components/notes/SpeakerCountPrompt.tsx
index d8d097718..5c4e5d77a 100644
--- a/openwhispr-mobile/src/components/notes/SpeakerCountPrompt.tsx
+++ b/openwhispr-mobile/src/components/notes/SpeakerCountPrompt.tsx
@@ -157,7 +157,7 @@ export const SpeakerCountPrompt = ({
className="flex-1 bg-systemBackground px-6"
style={{ paddingTop: headerHeight + 16, paddingBottom: Math.max(insets.bottom + 16, 32) }}
>
- <Text className="text-[28px] font-bold leading-tight text-label">
+ <Text accessibilityRole="header" className="text-[28px] font-bold leading-tight text-label">
{hasEventList ? 'What are you recording?' : 'How many people?'}
</Text>
<Text className="mt-2 text-base leading-5 text-secondaryLabel">
diff --git a/openwhispr-mobile/src/components/notes/SpeakerMergeSheet.tsx b/openwhispr-mobile/src/components/notes/SpeakerMergeSheet.tsx
index f99bba2cb..9860ec750 100644
--- a/openwhispr-mobile/src/components/notes/SpeakerMergeSheet.tsx
+++ b/openwhispr-mobile/src/components/notes/SpeakerMergeSheet.tsx
@@ -51,7 +51,9 @@ export function SpeakerMergeSheet({
className="gap-4 rounded-t-[24px] bg-systemBackground px-5 pb-8 pt-5"
testID="speaker-merge-sheet"
>
- <Text className="text-lg font-semibold text-label">Merge speaker</Text>
+ <Text accessibilityRole="header" className="text-lg font-semibold text-label">
+ Merge speaker
+ </Text>
{targets.length === 0 ? (
<Text className="text-[15px] text-secondaryLabel">
No other speakers to merge into.
diff --git a/openwhispr-mobile/src/components/notes/SpeakerRenameSheet.tsx b/openwhispr-mobile/src/components/notes/SpeakerRenameSheet.tsx
index 56fb63a10..63240e083 100644
--- a/openwhispr-mobile/src/components/notes/SpeakerRenameSheet.tsx
+++ b/openwhispr-mobile/src/components/notes/SpeakerRenameSheet.tsx
@@ -9,7 +9,7 @@ import {
View,
} from 'react-native';
import { Text } from '@/components/ui/Text';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
export interface SpeakerRenameSuggestion {
label: string;
@@ -48,7 +48,9 @@ export function SpeakerRenameSheet({
className="gap-4 rounded-t-[24px] bg-systemBackground px-5 pb-8 pt-5"
testID="speaker-rename-sheet"
>
- <Text className="text-lg font-semibold text-label">Rename speaker</Text>
+ <Text accessibilityRole="header" className="text-lg font-semibold text-label">
+ Rename speaker
+ </Text>
{suggestions.length > 0 ? (
<View className="flex-row flex-wrap gap-2" testID="speaker-rename-suggestions">
{suggestions.map((suggestion, index) => (
@@ -76,7 +78,7 @@ export function SpeakerRenameSheet({
placeholder="Speaker name"
placeholderTextColor={PlatformColor('tertiaryLabel') as unknown as string}
className="h-12 rounded-lg border border-separator bg-secondarySystemBackground px-3 text-base text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
testID="speaker-rename-input"
/>
<View className="flex-row gap-3">
diff --git a/openwhispr-mobile/src/components/notes/VoiceprintSuggestionSheet.tsx b/openwhispr-mobile/src/components/notes/VoiceprintSuggestionSheet.tsx
index 3cd1d3ec6..381a46401 100644
--- a/openwhispr-mobile/src/components/notes/VoiceprintSuggestionSheet.tsx
+++ b/openwhispr-mobile/src/components/notes/VoiceprintSuggestionSheet.tsx
@@ -30,7 +30,9 @@ export function VoiceprintSuggestionSheet({
testID="voiceprint-suggestion-sheet"
>
<View className="gap-1">
- <Text className="text-lg font-semibold text-label">{speakerName}</Text>
+ <Text accessibilityRole="header" className="text-lg font-semibold text-label">
+ {speakerName}
+ </Text>
<Text className="text-[14px] leading-5 text-secondaryLabel">
Confirm this suggestion to lock the speaker label on this transcript.
</Text>
diff --git a/openwhispr-mobile/src/components/settings/ModelLanguagesButton.tsx b/openwhispr-mobile/src/components/settings/ModelLanguagesButton.tsx
index 0fa55d7fb..1e6c32446 100644
--- a/openwhispr-mobile/src/components/settings/ModelLanguagesButton.tsx
+++ b/openwhispr-mobile/src/components/settings/ModelLanguagesButton.tsx
@@ -50,7 +50,10 @@ function ModelLanguagesSheet({
<Modal visible animationType="slide" presentationStyle="pageSheet" onRequestClose={onClose}>
<View className="flex-1 bg-systemBackground">
<View className="flex-row items-center justify-between px-6 pb-4 pt-8">
- <Text className="text-[22px] font-bold text-label">{`${title} Languages`}</Text>
+ <Text
+ accessibilityRole="header"
+ className="text-[22px] font-bold text-label"
+ >{`${title} Languages`}</Text>
<GlassIconButton onPress={onClose} accessibilityLabel="Close">
<SystemIcon name="xmark" mdName="X" size={15} color="secondaryLabel" />
</GlassIconButton>
diff --git a/openwhispr-mobile/src/components/ui/FormSheet.tsx b/openwhispr-mobile/src/components/ui/FormSheet.tsx
index 749a24fa2..f97c25c3d 100644
--- a/openwhispr-mobile/src/components/ui/FormSheet.tsx
+++ b/openwhispr-mobile/src/components/ui/FormSheet.tsx
@@ -101,7 +101,9 @@ export function FormSheet({
<View className="mb-2 self-center h-1.5 w-9 rounded-full bg-quaternaryLabel" />
<View className="flex-row items-start justify-between">
<View className="flex-1 pr-3">
- <Text className="text-[19px] font-bold text-label">{title}</Text>
+ <Text accessibilityRole="header" className="text-[19px] font-bold text-label">
+ {title}
+ </Text>
{subtitle ? (
<Text className="mt-1 text-[13px] text-secondaryLabel">{subtitle}</Text>
) : null}
diff --git a/openwhispr-mobile/src/components/ui/Input.tsx b/openwhispr-mobile/src/components/ui/Input.tsx
index 62d3c6ed6..86036e134 100644
--- a/openwhispr-mobile/src/components/ui/Input.tsx
+++ b/openwhispr-mobile/src/components/ui/Input.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import { TextInput, TextInputProps, View } from 'react-native';
import { Text } from '@/components/ui/Text';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { cn } from '../../lib/utils';
export interface InputProps extends TextInputProps {
@@ -23,7 +23,7 @@ export const Input = React.forwardRef<TextInput, InputProps>(
className,
)}
placeholderTextColor="#9CA3AF"
- style={[{ fontFamily: SpaceGrotesk.regular }, style]}
+ style={[{ fontFamily: AppFont.regular }, style]}
{...props}
/>
{error && <Text className="text-sm text-destructive">{error}</Text>}
diff --git a/openwhispr-mobile/src/components/ui/PermissionAlert.tsx b/openwhispr-mobile/src/components/ui/PermissionAlert.tsx
index 3b81c8417..e70872ddd 100644
--- a/openwhispr-mobile/src/components/ui/PermissionAlert.tsx
+++ b/openwhispr-mobile/src/components/ui/PermissionAlert.tsx
@@ -75,7 +75,12 @@ export function PermissionAlertMount() {
</Pressable>
</View>
<View className="items-center px-5 pt-1 pb-5">
- <Text className="text-center text-[17px] font-semibold text-label">{title}</Text>
+ <Text
+ accessibilityRole="header"
+ className="text-center text-[17px] font-semibold text-label"
+ >
+ {title}
+ </Text>
<Text className="mt-1.5 text-center text-[13px] leading-[18px] text-secondaryLabel">
{message}
</Text>
diff --git a/openwhispr-mobile/src/components/ui/SearchField.tsx b/openwhispr-mobile/src/components/ui/SearchField.tsx
index 532b396c3..3611b26a2 100644
--- a/openwhispr-mobile/src/components/ui/SearchField.tsx
+++ b/openwhispr-mobile/src/components/ui/SearchField.tsx
@@ -1,7 +1,7 @@
import { ReactNode, forwardRef } from 'react';
import { View, TextInput, PlatformColor, type TextInputProps } from 'react-native';
import { SystemIcon } from '@/components/ui/SystemIcon';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
const SEARCH_FIELD_RADIUS = 10;
const SEARCH_FIELD_HEIGHT = 48;
@@ -56,7 +56,7 @@ export const SearchField = forwardRef<TextInput, SearchFieldProps>(function Sear
autoFocus={autoFocus}
clearButtonMode="while-editing"
className="flex-1 py-0 text-[15px] text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
{rightSlot}
</View>
diff --git a/openwhispr-mobile/src/components/ui/SettingsSection.tsx b/openwhispr-mobile/src/components/ui/SettingsSection.tsx
index c5897827d..ab3a11fc8 100644
--- a/openwhispr-mobile/src/components/ui/SettingsSection.tsx
+++ b/openwhispr-mobile/src/components/ui/SettingsSection.tsx
@@ -3,7 +3,7 @@ import { View, Pressable, StyleSheet, TextInput, type TextInputProps } from 'rea
import { Text } from '@/components/ui/Text';
import { SystemIcon, type LucideIconName } from './SystemIcon';
import { BRAND, iosColor } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
type SettingsRowProps = {
icon: string;
@@ -131,7 +131,7 @@ export function SettingsTextFieldRow({
autoCorrect={false}
editable={editable}
className={`flex-1 py-3 text-[17px] text-label ${editable ? '' : 'opacity-40'}`}
- style={[{ fontFamily: SpaceGrotesk.regular }, style]}
+ style={[{ fontFamily: AppFont.regular }, style]}
{...inputProps}
/>
{trailing}
diff --git a/openwhispr-mobile/src/components/ui/TabScreenHeader.tsx b/openwhispr-mobile/src/components/ui/TabScreenHeader.tsx
index 7fad77b67..343593b4d 100644
--- a/openwhispr-mobile/src/components/ui/TabScreenHeader.tsx
+++ b/openwhispr-mobile/src/components/ui/TabScreenHeader.tsx
@@ -23,7 +23,11 @@ export function TabScreenHeader({ title, left, right }: Props) {
<View className="min-h-[44px] flex-row items-center justify-between">
<View>{left}</View>
<View pointerEvents="none" testID="screen-header-title" style={styles.titleWrap}>
- <Text numberOfLines={1} className="text-[17px] font-semibold text-label">
+ <Text
+ accessibilityRole="header"
+ numberOfLines={1}
+ className="text-[17px] font-semibold text-label"
+ >
{title}
</Text>
</View>
diff --git a/openwhispr-mobile/src/components/ui/Text.tsx b/openwhispr-mobile/src/components/ui/Text.tsx
index 40d8302c0..0d1e2ca4d 100644
--- a/openwhispr-mobile/src/components/ui/Text.tsx
+++ b/openwhispr-mobile/src/components/ui/Text.tsx
@@ -1,13 +1,29 @@
-import { forwardRef } from 'react';
+import { createContext, forwardRef, useContext } from 'react';
import { StyleSheet, Text as RNText, type TextProps, type TextStyle } from 'react-native';
import { cssInterop } from 'nativewind';
-import { fontFamilyForWeight } from '@/lib/fonts';
+import { displayFontFamily, fontFamilyForWeight } from '@/lib/fonts';
+
+// A span without its own weight (e.g. an accent-coloured word) keeps its
+// parent's face; picking one by its missing weight would drop it to regular
+// mid-line.
+const ParentFontContext = createContext<string | undefined>(undefined);
const BaseText = forwardRef<RNText, TextProps>(function BaseText({ style, ...props }, ref) {
+ const parentFontFamily = useContext(ParentFontContext);
const flat = (StyleSheet.flatten(style) ?? {}) as TextStyle;
- const fontFamily = flat.fontFamily ?? fontFamilyForWeight(flat.fontWeight);
+ const headingFontFamily = props.accessibilityRole === 'header' ? displayFontFamily : undefined;
+ const inheritedFontFamily = flat.fontWeight == null ? parentFontFamily : undefined;
+ const fontFamily =
+ flat.fontFamily ??
+ headingFontFamily ??
+ inheritedFontFamily ??
+ fontFamilyForWeight(flat.fontWeight);
- return <RNText ref={ref} style={[{ fontFamily }, style]} {...props} />;
+ return (
+ <ParentFontContext.Provider value={fontFamily}>
+ <RNText ref={ref} style={[{ fontFamily }, style]} {...props} />
+ </ParentFontContext.Provider>
+ );
});
BaseText.displayName = 'AppText';
diff --git a/openwhispr-mobile/src/components/ui/__tests__/Text.test.tsx b/openwhispr-mobile/src/components/ui/__tests__/Text.test.tsx
new file mode 100644
index 000000000..5a16703ef
--- /dev/null
+++ b/openwhispr-mobile/src/components/ui/__tests__/Text.test.tsx
@@ -0,0 +1,89 @@
+import { StyleSheet } from 'react-native';
+import { render } from '@testing-library/react-native';
+
+// nativewind's native build does not load under Jest; className is unused here.
+jest.mock('nativewind', () => ({ cssInterop: <T,>(component: T): T => component }));
+
+const mockFonts: { displayFontFamily: string | undefined } = { displayFontFamily: 'Display' };
+jest.mock('@/lib/fonts', () => ({
+ get displayFontFamily() {
+ return mockFonts.displayFontFamily;
+ },
+ fontFamilyForWeight: (weight: string | undefined) => `Body-${weight ?? '400'}`,
+}));
+
+import { Text } from '../Text';
+
+function fontFamilyOf(element: ReturnType<typeof render>['root']): string | undefined {
+ return StyleSheet.flatten(element.props.style).fontFamily;
+}
+
+describe('Text', () => {
+ beforeEach(() => {
+ mockFonts.displayFontFamily = 'Display';
+ });
+
+ it('picks the body face for the text weight', () => {
+ const { root } = render(<Text style={{ fontWeight: '700' }}>Body</Text>);
+
+ expect(fontFamilyOf(root)).toBe('Body-700');
+ });
+
+ it('sets headings in the display face', () => {
+ const { root } = render(<Text accessibilityRole="header">Title</Text>);
+
+ expect(fontFamilyOf(root)).toBe('Display');
+ });
+
+ // e.g. the accent-coloured word in an onboarding title.
+ it('keeps spans nested in a heading in the display face', () => {
+ const { getByText } = render(
+ <Text accessibilityRole="header">
+ Security-first <Text style={{ color: 'blue' }}>speech</Text>
+ </Text>,
+ );
+
+ expect(StyleSheet.flatten(getByText('speech').props.style).fontFamily).toBe('Display');
+ });
+
+ it("keeps a span without its own weight in its parent's face", () => {
+ const { getByText } = render(
+ <Text style={{ fontWeight: '600' }}>
+ Tap <Text style={{ color: 'blue' }}>here</Text>
+ </Text>,
+ );
+
+ expect(StyleSheet.flatten(getByText('here').props.style).fontFamily).toBe('Body-600');
+ });
+
+ it('lets a nested span with its own weight pick its face', () => {
+ const { getByText } = render(
+ <Text>
+ Tap <Text style={{ fontWeight: '700' }}>here</Text>
+ </Text>,
+ );
+
+ expect(StyleSheet.flatten(getByText('here').props.style).fontFamily).toBe('Body-700');
+ });
+
+ it('keeps the weight-based face for headings when there is no display face', () => {
+ mockFonts.displayFontFamily = undefined;
+ const { root } = render(
+ <Text accessibilityRole="header" style={{ fontWeight: '700' }}>
+ Title
+ </Text>,
+ );
+
+ expect(fontFamilyOf(root)).toBe('Body-700');
+ });
+
+ it('lets an explicit font family win', () => {
+ const { root } = render(
+ <Text accessibilityRole="header" style={{ fontFamily: 'Menlo' }}>
+ Code
+ </Text>,
+ );
+
+ expect(fontFamilyOf(root)).toBe('Menlo');
+ });
+});
diff --git a/openwhispr-mobile/src/config/navigation.ts b/openwhispr-mobile/src/config/navigation.ts
index 5829ffa63..2ac8c36da 100644
--- a/openwhispr-mobile/src/config/navigation.ts
+++ b/openwhispr-mobile/src/config/navigation.ts
@@ -1,10 +1,14 @@
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
+import { displayFontFamily } from '@/lib/fonts';
export const glassStackOptions: NativeStackNavigationOptions = {
headerTransparent: true,
headerLargeTitle: true,
headerBlurEffect: 'systemMaterial',
headerLargeStyle: { backgroundColor: 'transparent' },
+ // Without Yowza the family is undefined and titles stay in the system font.
+ headerTitleStyle: { fontFamily: displayFontFamily },
+ headerLargeTitleStyle: { fontFamily: displayFontFamily },
headerShadowVisible: false,
headerLargeTitleShadowVisible: false,
headerBackButtonDisplayMode: 'minimal',
diff --git a/openwhispr-mobile/src/lib/__tests__/fonts.test.ts b/openwhispr-mobile/src/lib/__tests__/fonts.test.ts
new file mode 100644
index 000000000..53f356cd4
--- /dev/null
+++ b/openwhispr-mobile/src/lib/__tests__/fonts.test.ts
@@ -0,0 +1,70 @@
+import type { PlatformOSType } from 'react-native';
+
+const mockGetLoadedFonts = jest.fn<string[], []>();
+jest.mock('expo-font', () => ({ getLoadedFonts: () => mockGetLoadedFonts() }));
+
+const IOS_YOWZA_FACES = ['Yowza-Std-Regular', 'Yowza-Soft-Std-Medium'];
+
+// fonts.ts decides once, at import, from what the native binary embeds.
+function loadFontsWith(
+ embedded: string[],
+ os: PlatformOSType = 'ios',
+): typeof import('@/lib/fonts') {
+ mockGetLoadedFonts.mockReturnValue(embedded);
+ let fonts: typeof import('@/lib/fonts') | undefined;
+ jest.isolateModules(() => {
+ // The isolated registry has its own react-native, so set the OS on that one.
+ jest.replaceProperty(require('react-native').Platform, 'OS', os);
+ fonts = require('@/lib/fonts');
+ });
+ return fonts!;
+}
+
+describe('fonts', () => {
+ afterEach(() => {
+ jest.restoreAllMocks();
+ });
+
+ it('falls back to Space Grotesk when the build has no Yowza', () => {
+ const fonts = loadFontsWith([]);
+
+ expect(fonts.AppFont.regular).toBe('SpaceGrotesk_400Regular');
+ expect(fonts.fontFamilyForWeight('600')).toBe('SpaceGrotesk_600SemiBold');
+ expect(fonts.displayFontFamily).toBeUndefined();
+ });
+
+ it('uses Yowza for regular text and Yowza Soft for headings when embedded', () => {
+ const fonts = loadFontsWith(IOS_YOWZA_FACES);
+
+ expect(fonts.fontFamilyForWeight(undefined)).toBe('Yowza-Std-Regular');
+ expect(fonts.fontFamilyForWeight('normal')).toBe('Yowza-Std-Regular');
+ expect(fonts.displayFontFamily).toBe('Yowza-Soft-Std-Medium');
+ });
+
+ // Yowza's own Medium and Bold read too heavy on mobile.
+ it.each(['500', '600', '700', 'bold', '900'] as const)(
+ 'sets %s-weight text in Yowza Soft Medium',
+ (weight) => {
+ const fonts = loadFontsWith(IOS_YOWZA_FACES);
+
+ expect(fonts.fontFamilyForWeight(weight)).toBe('Yowza-Soft-Std-Medium');
+ },
+ );
+
+ it('keeps Space Grotesk when only some Yowza faces are embedded', () => {
+ const fonts = loadFontsWith(IOS_YOWZA_FACES.slice(0, 1));
+
+ expect(fonts.AppFont.regular).toBe('SpaceGrotesk_400Regular');
+ expect(fonts.displayFontFamily).toBeUndefined();
+ });
+
+ it('names embedded faces by file name on Android', () => {
+ const fonts = loadFontsWith(
+ IOS_YOWZA_FACES.map((face) => face.toLowerCase()),
+ 'android',
+ );
+
+ expect(fonts.AppFont.regular).toBe('yowza-std-regular');
+ expect(fonts.displayFontFamily).toBe('yowza-soft-std-medium');
+ });
+});
diff --git a/openwhispr-mobile/src/lib/fonts.ts b/openwhispr-mobile/src/lib/fonts.ts
index 5801a72e5..1b9878528 100644
--- a/openwhispr-mobile/src/lib/fonts.ts
+++ b/openwhispr-mobile/src/lib/fonts.ts
@@ -1,13 +1,44 @@
-import type { TextStyle } from 'react-native';
+import { Platform, type TextStyle } from 'react-native';
+import { getLoadedFonts } from 'expo-font';
-// Family constants — keep in sync with the keys passed to `useFonts` in
-// app/_layout.tsx and the asset names installed by @expo-google-fonts.
-export const SpaceGrotesk = {
+type FontFaces = { regular: string; medium: string; semibold: string; bold: string };
+
+// Keep in sync with the keys passed to `useFonts` in app/_layout.tsx. Space
+// Grotesk is the fallback for builds without Yowza.
+const SPACE_GROTESK: FontFaces = {
regular: 'SpaceGrotesk_400Regular',
medium: 'SpaceGrotesk_500Medium',
semibold: 'SpaceGrotesk_600SemiBold',
bold: 'SpaceGrotesk_700Bold',
-} as const;
+};
+
+// Yowza is licensed, so app.config.js embeds it in the native binary only when
+// `npm run download:brand-fonts` fetched it. iOS names an embedded face by its
+// PostScript name, Android by its file name.
+function embeddedFace(postScriptName: string): string {
+ return Platform.OS === 'ios' ? postScriptName : postScriptName.toLowerCase();
+}
+
+// Every emphasis weight is set in Yowza Soft Medium: Yowza's own Medium and
+// Bold read too heavy at mobile sizes, so mobile departs from desktop here.
+const YOWZA_SOFT_MEDIUM = embeddedFace('Yowza-Soft-Std-Medium');
+const YOWZA: FontFaces = {
+ regular: embeddedFace('Yowza-Std-Regular'),
+ medium: YOWZA_SOFT_MEDIUM,
+ semibold: YOWZA_SOFT_MEDIUM,
+ bold: YOWZA_SOFT_MEDIUM,
+};
+
+// Ask the running binary, not the JS bundle: an OTA update or a dev bundle can
+// run on a native build made with or without the fonts.
+const embeddedFonts = new Set(getLoadedFonts());
+const hasYowza = Object.values(YOWZA).every((face) => embeddedFonts.has(face));
+
+export const AppFont: FontFaces = hasYowza ? YOWZA : SPACE_GROTESK;
+
+// Headings are set in Yowza Soft, like desktop's h1–h6. Without Yowza they keep
+// their weight-based face.
+export const displayFontFamily: string | undefined = hasYowza ? YOWZA_SOFT_MEDIUM : undefined;
export function fontFamilyForWeight(weight: TextStyle['fontWeight']): string {
// RN passes fontWeight as a string ('400', 'bold', etc.) or number.
@@ -18,17 +49,17 @@ export function fontFamilyForWeight(weight: TextStyle['fontWeight']): string {
case '300':
case '400':
case 'normal':
- return SpaceGrotesk.regular;
+ return AppFont.regular;
case '500':
- return SpaceGrotesk.medium;
+ return AppFont.medium;
case '600':
- return SpaceGrotesk.semibold;
+ return AppFont.semibold;
case '700':
case '800':
case '900':
case 'bold':
- return SpaceGrotesk.bold;
+ return AppFont.bold;
default:
- return SpaceGrotesk.regular;
+ return AppFont.regular;
}
}
diff --git a/openwhispr-mobile/src/screens/ActionManagerScreen.tsx b/openwhispr-mobile/src/screens/ActionManagerScreen.tsx
index 12ebf5a7b..26f095ccb 100644
--- a/openwhispr-mobile/src/screens/ActionManagerScreen.tsx
+++ b/openwhispr-mobile/src/screens/ActionManagerScreen.tsx
@@ -3,7 +3,7 @@ import { View, TextInput, ScrollView, Pressable } from 'react-native';
import { Text } from '@/components/ui/Text';
import { useActionsStore } from '@/store/useActionsStore';
import { SystemIcon } from '@/components/ui/SystemIcon';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { safeHaptics } from '@/lib/utils';
import { confirmDestructive } from '@/lib/alerts';
import { iosColor } from '@/config/colors';
@@ -63,7 +63,7 @@ export default function ActionManagerScreen() {
placeholder="Action name"
placeholderTextColor={PLACEHOLDER_COLOR}
className="border-b border-separator/40 py-2 text-base text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
<TextInput
value={prompt}
@@ -73,7 +73,7 @@ export default function ActionManagerScreen() {
multiline
textAlignVertical="top"
className="min-h-[80px] py-2 text-[15px] text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
<Pressable
onPress={handleSave}
diff --git a/openwhispr-mobile/src/screens/AuthScreen.tsx b/openwhispr-mobile/src/screens/AuthScreen.tsx
index e723c357e..fcda47d32 100644
--- a/openwhispr-mobile/src/screens/AuthScreen.tsx
+++ b/openwhispr-mobile/src/screens/AuthScreen.tsx
@@ -18,7 +18,7 @@ import { useAuthStore } from '@/store/useAuthStore';
import { checkUserExists } from '@/lib/authClient';
import { safeHaptics } from '@/lib/utils';
import { SystemIcon } from '@/components/ui/SystemIcon';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { BRAND_GRADIENT } from '@/config/colors';
import { LinearGradient } from 'expo-linear-gradient';
import { OpenWhisprMark } from '@/components/ui/OpenWhisprMark';
@@ -268,11 +268,15 @@ export default function AuthScreen({
>
<SystemIcon name="chevron.left" mdName="ChevronLeft" size={22} color="#FFFFFF" />
</Pressable>
- <Text style={styles.headline}>{headerTitle}</Text>
+ <Text accessibilityRole="header" style={styles.headline}>
+ {headerTitle}
+ </Text>
{email.trim() ? <Text style={styles.headerSub}>{email.trim()}</Text> : null}
</View>
) : (
- <Text style={styles.headline}>Privacy-first{'\n'}voice-to-text AI</Text>
+ <Text accessibilityRole="header" style={styles.headline}>
+ Privacy-first{'\n'}voice-to-text AI
+ </Text>
)}
{/* Spacer pushes the action stack to the bottom (collapses with keyboard) */}
@@ -560,7 +564,7 @@ const styles = StyleSheet.create({
borderWidth: StyleSheet.hairlineWidth,
borderColor: 'rgba(255,255,255,0.4)',
paddingHorizontal: 18,
- fontFamily: SpaceGrotesk.regular,
+ fontFamily: AppFont.regular,
fontSize: 16,
color: '#FFFFFF',
backgroundColor: 'rgba(255,255,255,0.25)',
diff --git a/openwhispr-mobile/src/screens/CleanupPromptScreen.tsx b/openwhispr-mobile/src/screens/CleanupPromptScreen.tsx
index 0fd125dde..bb0d0ad90 100644
--- a/openwhispr-mobile/src/screens/CleanupPromptScreen.tsx
+++ b/openwhispr-mobile/src/screens/CleanupPromptScreen.tsx
@@ -16,7 +16,7 @@ import {
} from '@/config/prompts/registry';
import { confirmDestructive } from '@/lib/alerts';
import { safeHaptics } from '@/lib/utils';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
// The prompt is re-sent with every cleanup request; ~5x the shipped default
// is where latency becomes noticeable. A caution, not a cap: the server has
@@ -103,7 +103,7 @@ export default function CleanupPromptScreen() {
autoCorrect={false}
spellCheck={false}
className="min-h-[240px] text-[15px] leading-[22px] text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
</View>
</SettingsSection>
diff --git a/openwhispr-mobile/src/screens/DictationAgentScreen.tsx b/openwhispr-mobile/src/screens/DictationAgentScreen.tsx
index 800e88130..8f24dba5f 100644
--- a/openwhispr-mobile/src/screens/DictationAgentScreen.tsx
+++ b/openwhispr-mobile/src/screens/DictationAgentScreen.tsx
@@ -10,7 +10,7 @@ import { useProcessingModeStore } from '@/store/useProcessingModeStore';
import { getDictationAgentName, isDictationAgentEnabled } from '@/lib/dictationAgent';
import { safeHaptics } from '@/lib/utils';
import { iosColor } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
const DEFAULT_AGENT_NAME = 'OpenWhispr';
@@ -101,7 +101,7 @@ export function DictationAgentScreen(): React.JSX.Element {
returnKeyType="done"
editable={isAvailable}
className={`text-[17px] text-label ${isAvailable ? '' : 'opacity-40'}`}
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
</View>
</SettingsSection>
diff --git a/openwhispr-mobile/src/screens/HomeScreen.tsx b/openwhispr-mobile/src/screens/HomeScreen.tsx
index 9ff3d2905..fffa75e26 100644
--- a/openwhispr-mobile/src/screens/HomeScreen.tsx
+++ b/openwhispr-mobile/src/screens/HomeScreen.tsx
@@ -474,7 +474,10 @@ export default function HomeScreen() {
return (
<View className="flex-1 bg-systemBackground items-center justify-center px-10">
<SystemIcon name="mic.slash.fill" mdName="MicOff" size={48} color="tertiaryLabel" />
- <Text className="mt-5 text-2xl font-semibold text-label text-center">
+ <Text
+ accessibilityRole="header"
+ className="mt-5 text-2xl font-semibold text-label text-center"
+ >
We didn&apos;t catch that
</Text>
<Text className="mt-2 text-base text-secondaryLabel text-center">
@@ -501,7 +504,10 @@ export default function HomeScreen() {
</View>
<View className="items-center px-8 mt-4">
- <Text className="text-[32px] font-bold text-label leading-[38px] text-center">
+ <Text
+ accessibilityRole="header"
+ className="text-[32px] font-bold text-label leading-[38px] text-center"
+ >
{transcribing ? 'Almost done…' : 'Swipe back to your app'}
</Text>
<Text className="mt-2 text-[15px] text-secondaryLabel leading-6 text-center">
diff --git a/openwhispr-mobile/src/screens/MeetingRecordScreen.tsx b/openwhispr-mobile/src/screens/MeetingRecordScreen.tsx
index e8c7d27e9..008e144dc 100644
--- a/openwhispr-mobile/src/screens/MeetingRecordScreen.tsx
+++ b/openwhispr-mobile/src/screens/MeetingRecordScreen.tsx
@@ -366,7 +366,9 @@ export const MeetingRecordScreen = (): React.JSX.Element => {
if (phase === 'unsupported') {
return (
<View className="flex-1 gap-4 bg-systemBackground px-6" style={{ paddingTop: headerHeight }}>
- <Text className="text-2xl font-bold text-label">Not available on this device</Text>
+ <Text accessibilityRole="header" className="text-2xl font-bold text-label">
+ Not available on this device
+ </Text>
<Text className="text-base text-secondaryLabel">
Meeting diarization runs on the Apple Neural Engine and needs iOS 17+ in a development or
production build (not Expo Go or other platforms).
@@ -380,7 +382,9 @@ export const MeetingRecordScreen = (): React.JSX.Element => {
if (phase === 'needs-model') {
return (
<View className="flex-1 gap-4 bg-systemBackground px-6" style={{ paddingTop: headerHeight }}>
- <Text className="text-2xl font-bold text-label">Download diarization model</Text>
+ <Text accessibilityRole="header" className="text-2xl font-bold text-label">
+ Download diarization model
+ </Text>
<Text className="text-base text-secondaryLabel">
A one-time ~100 MB download. Runs fully on-device after that.
</Text>
diff --git a/openwhispr-mobile/src/screens/NoteEditorScreen.tsx b/openwhispr-mobile/src/screens/NoteEditorScreen.tsx
index 22373ead9..2028d24a1 100644
--- a/openwhispr-mobile/src/screens/NoteEditorScreen.tsx
+++ b/openwhispr-mobile/src/screens/NoteEditorScreen.tsx
@@ -43,7 +43,7 @@ import { Glass } from '@/components/ui/Glass';
import { GlassBackButton } from '@/components/ui/GlassBackButton';
import { TabScreenHeader } from '@/components/ui/TabScreenHeader';
import { buildNoteShareContent, exportNote } from '@/lib/noteExport';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { makeContentHash, safeHaptics } from '@/lib/utils';
import { parseNoteTimestamp } from '@/lib/parseNoteTimestamp';
import { isManagedMeetingAudioUri } from '@/lib/transcriptAudio';
@@ -963,7 +963,7 @@ export default function NoteEditorScreen() {
placeholderTextColor="rgba(0,0,0,0.2)"
multiline
className="mb-3 text-3xl font-bold leading-9 text-label"
- style={{ fontFamily: SpaceGrotesk.bold }}
+ style={{ fontFamily: AppFont.bold }}
/>
{updatedAtDisplay ? (
@@ -1100,7 +1100,7 @@ export default function NoteEditorScreen() {
editable={!isEnhancing}
textAlignVertical="top"
className="min-h-[300px] text-base leading-6 text-label"
- style={{ fontFamily: SpaceGrotesk.regular, opacity: isEnhancing ? 0.4 : 1 }}
+ style={{ fontFamily: AppFont.regular, opacity: isEnhancing ? 0.4 : 1 }}
/>
) : (
<View className="min-h-[180px]" />
diff --git a/openwhispr-mobile/src/screens/ProfileScreen.tsx b/openwhispr-mobile/src/screens/ProfileScreen.tsx
index ca82636df..4cb562000 100644
--- a/openwhispr-mobile/src/screens/ProfileScreen.tsx
+++ b/openwhispr-mobile/src/screens/ProfileScreen.tsx
@@ -59,7 +59,10 @@ export default function ProfileScreen() {
<Text className="text-[28px] font-semibold text-white tracking-tight">{initials}</Text>
</View>
<View className="mt-3 flex-row items-center gap-2">
- <Text className="shrink text-[22px] font-semibold text-label tracking-tight">
+ <Text
+ accessibilityRole="header"
+ className="shrink text-[22px] font-semibold text-label tracking-tight"
+ >
{displayName}
</Text>
{user ? <PlanBadge usage={usage} /> : null}
diff --git a/openwhispr-mobile/src/screens/ReferralScreen.tsx b/openwhispr-mobile/src/screens/ReferralScreen.tsx
index 938f50e8f..a1f67eece 100644
--- a/openwhispr-mobile/src/screens/ReferralScreen.tsx
+++ b/openwhispr-mobile/src/screens/ReferralScreen.tsx
@@ -16,7 +16,7 @@ import {
} from '@/lib/referralApi';
import { safeHaptics, isValidEmail } from '@/lib/utils';
import { iosColor } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { handleAccountRequiredError, requiresRealAccount } from '@/lib/accountAccess';
import { router } from 'expo-router';
@@ -96,7 +96,10 @@ function GuestReferralEmptyState() {
<GradientGlassSurface radius={18} />
<SystemIcon name="gift.fill" mdName="Gift" size={30} color="#FFFFFF" />
</View>
- <Text className="mt-[18px] text-center text-[22px] font-bold tracking-tight text-label">
+ <Text
+ accessibilityRole="header"
+ className="mt-[18px] text-center text-[22px] font-bold tracking-tight text-label"
+ >
Give a month, get a month
</Text>
<Text className="mt-2 text-center text-[14px] leading-snug text-secondaryLabel">
@@ -360,7 +363,7 @@ export default function ReferralScreen() {
returnKeyType="send"
onSubmitEditing={handleSendInvite}
editable={!sendingInvite}
- style={{ color: LABEL_COLOR, fontFamily: SpaceGrotesk.regular }}
+ style={{ color: LABEL_COLOR, fontFamily: AppFont.regular }}
className="flex-1 py-3 text-[14px]"
/>
</View>
diff --git a/openwhispr-mobile/src/screens/TranscriptionLanguageScreen.tsx b/openwhispr-mobile/src/screens/TranscriptionLanguageScreen.tsx
index 2e9bb79d4..864488c8a 100644
--- a/openwhispr-mobile/src/screens/TranscriptionLanguageScreen.tsx
+++ b/openwhispr-mobile/src/screens/TranscriptionLanguageScreen.tsx
@@ -5,7 +5,7 @@ import { useHeaderHeight } from '@react-navigation/elements';
import { router } from 'expo-router';
import { SystemIcon } from '@/components/ui/SystemIcon';
import { useConfigStore } from '@/store/useConfigStore';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { safeHaptics } from '@/lib/utils';
import { LANGUAGES, DEFAULT_LANGUAGE, type Language } from '@/lib/languages';
@@ -93,7 +93,7 @@ export default function TranscriptionLanguageScreen() {
autoCapitalize="none"
className="flex-1 text-[16px] text-label"
returnKeyType="search"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
{query.length > 0 ? (
<Pressable onPress={() => setQuery('')} hitSlop={8}>
diff --git a/openwhispr-mobile/src/screens/VoiceEnrollmentScreen.tsx b/openwhispr-mobile/src/screens/VoiceEnrollmentScreen.tsx
index 2e1472723..20e4af228 100644
--- a/openwhispr-mobile/src/screens/VoiceEnrollmentScreen.tsx
+++ b/openwhispr-mobile/src/screens/VoiceEnrollmentScreen.tsx
@@ -94,7 +94,7 @@ export default function VoiceEnrollmentScreen() {
keyboardShouldPersistTaps="handled"
contentContainerStyle={{ padding: 16, paddingBottom: 40 }}
>
- <Text className="mb-5 text-2xl font-bold text-label">
+ <Text accessibilityRole="header" className="mb-5 text-2xl font-bold text-label">
{existingProfile ? 'Re-enroll Voice' : 'Enroll Voice'}
</Text>
<VoiceEnrollmentRecorder
diff --git a/openwhispr-mobile/src/screens/VoiceProfileDetailScreen.tsx b/openwhispr-mobile/src/screens/VoiceProfileDetailScreen.tsx
index 98417e0e8..e66cca0b0 100644
--- a/openwhispr-mobile/src/screens/VoiceProfileDetailScreen.tsx
+++ b/openwhispr-mobile/src/screens/VoiceProfileDetailScreen.tsx
@@ -9,7 +9,7 @@ import { useNotesStore } from '@/store/useNotesStore';
import { confirmDestructive } from '@/lib/alerts';
import { safeHaptics } from '@/lib/utils';
import { iosColor } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
const formatDate = (value: string | null): string => {
if (!value) return 'On this device';
@@ -53,7 +53,7 @@ function FieldRow({
returnKeyType="done"
testID={testID}
className="flex-1 py-3 text-[17px] text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
</View>
);
@@ -153,7 +153,9 @@ export default function VoiceProfileDetailScreen() {
<View className="items-center gap-2.5 pb-1 pt-2">
<SpeakerAvatar name={profile.displayName} isOwner={isOwner} size={76} />
<View className="flex-row items-center gap-2">
- <Text className="text-[22px] font-bold text-label">{profile.displayName}</Text>
+ <Text accessibilityRole="header" className="text-[22px] font-bold text-label">
+ {profile.displayName}
+ </Text>
{isOwner ? (
<View className="rounded-md bg-tertiarySystemFill px-2 py-0.5">
<Text className="text-[12px] font-semibold text-secondaryLabel">Owner</Text>
diff --git a/openwhispr-mobile/src/screens/__tests__/ReferralScreen.anonymous.test.tsx b/openwhispr-mobile/src/screens/__tests__/ReferralScreen.anonymous.test.tsx
index 51aa61470..8b70f2d31 100644
--- a/openwhispr-mobile/src/screens/__tests__/ReferralScreen.anonymous.test.tsx
+++ b/openwhispr-mobile/src/screens/__tests__/ReferralScreen.anonymous.test.tsx
@@ -28,7 +28,7 @@ jest.mock('@/lib/referralApi', () => ({
jest.mock('expo-clipboard', () => ({ setStringAsync: jest.fn() }));
jest.mock('@/lib/utils', () => ({ safeHaptics: jest.fn(), isValidEmail: () => true }));
jest.mock('@/config/colors', () => ({ iosColor: () => '#999' }));
-jest.mock('@/lib/fonts', () => ({ SpaceGrotesk: {} }));
+jest.mock('@/lib/fonts', () => ({ AppFont: {} }));
jest.mock('@/lib/accountAccess', () => ({
...jest.requireActual('@/lib/accountRequiredError'),
handleAccountRequiredError: jest.fn(() => false),
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/DictationEmailStep.tsx b/openwhispr-mobile/src/screens/onboarding/steps/DictationEmailStep.tsx
index bc9689705..5f2bddbdc 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/DictationEmailStep.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/DictationEmailStep.tsx
@@ -11,7 +11,7 @@ import {
} from 'react-native';
import { Text } from '@/components/ui/Text';
import { OnboardingShell } from '@/components/onboarding/OnboardingShell';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { OnboardingError } from '@/lib/onboardingErrors';
import { useOnboardingPracticeMode } from '@/hooks/useOnboardingPracticeMode';
import { useOnboardingStep } from '@/hooks/useOnboardingStep';
@@ -190,7 +190,7 @@ const styles = StyleSheet.create({
emailInput: {
minHeight: 140,
color: PlatformColor('label') as unknown as string,
- fontFamily: SpaceGrotesk.regular,
+ fontFamily: AppFont.regular,
fontSize: 16,
fontWeight: '400',
lineHeight: 22,
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/GetStartedStep.tsx b/openwhispr-mobile/src/screens/onboarding/steps/GetStartedStep.tsx
index 409de0e3a..c623fdf76 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/GetStartedStep.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/GetStartedStep.tsx
@@ -25,7 +25,12 @@ export function GetStartedStep() {
<SafeAreaView className="flex-1 bg-systemBackground" edges={['top', 'bottom']}>
<View className="flex-1 items-center justify-center gap-5 px-8">
<OpenWhisprMark size={64} color={DEEP_BLUE} />
- <Text className="text-[34px] font-bold tracking-tight text-label">OpenWhispr</Text>
+ <Text
+ accessibilityRole="header"
+ className="text-[34px] font-bold tracking-tight text-label"
+ >
+ OpenWhispr
+ </Text>
<Text className="text-center text-[17px] leading-[23px] text-secondaryLabel">
Your voice is 3x faster than your keyboard.
</Text>
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/KeyboardSwitchStep.tsx b/openwhispr-mobile/src/screens/onboarding/steps/KeyboardSwitchStep.tsx
index a26ee38dc..6312e1e5b 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/KeyboardSwitchStep.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/KeyboardSwitchStep.tsx
@@ -16,7 +16,7 @@ import Animated, {
import { OnboardingShell } from '@/components/onboarding/OnboardingShell';
import { KeyboardDetectedToast } from '@/components/onboarding/KeyboardDetectedToast';
import { SystemIcon } from '@/components/ui/SystemIcon';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { useKeyboardHeartbeat } from '@/hooks/useKeyboardHeartbeat';
import { describeOnboardingError } from '@/lib/onboardingErrors';
import { KeyboardSwitchHelpSheet } from './KeyboardSwitchHelpSheet';
@@ -109,17 +109,26 @@ export function KeyboardSwitchStep() {
function KeyboardSwitchTitle() {
return (
<View>
- <Text className="text-[28px] font-medium leading-[34px] text-label">
+ <Text
+ accessibilityRole="header"
+ className="text-[28px] font-medium leading-[34px] text-label"
+ >
Switch to OpenWhispr.
</Text>
<View className="flex-row flex-wrap items-center">
- <Text className="text-[28px] font-medium leading-[34px] text-label">
+ <Text
+ accessibilityRole="header"
+ className="text-[28px] font-medium leading-[34px] text-label"
+ >
Press and hold the{' '}
</Text>
<View className="h-8 w-8 items-center justify-center rounded-full bg-secondarySystemGroupedBackground">
<SystemIcon name="globe" mdName="Globe" size={16} color="label" />
</View>
- <Text className="text-[28px] font-medium leading-[34px] text-label">
+ <Text
+ accessibilityRole="header"
+ className="text-[28px] font-medium leading-[34px] text-label"
+ >
{' '}
icon in the bottom-left corner of your keyboard, then select{' '}
<Text className="text-primary">OpenWhispr</Text>
@@ -217,7 +226,7 @@ function Divider() {
const styles = StyleSheet.create({
highlightedRowLabel: {
- fontFamily: SpaceGrotesk.semibold,
+ fontFamily: AppFont.semibold,
fontSize: 16,
fontWeight: '600',
},
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/LanguageStep.tsx b/openwhispr-mobile/src/screens/onboarding/steps/LanguageStep.tsx
index c2917bc22..a63371bb9 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/LanguageStep.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/LanguageStep.tsx
@@ -5,7 +5,7 @@ import { Text } from '@/components/ui/Text';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { OnboardingShell } from '@/components/onboarding/OnboardingShell';
import { SystemIcon } from '@/components/ui/SystemIcon';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { saveOnboardingConfig } from '@/lib/onboardingMode';
import { useConfigStore } from '@/store/useConfigStore';
import { detectPreferredLanguages } from '@/lib/deviceLanguages';
@@ -273,7 +273,9 @@ function AddLanguageSheet({
>
<View className="flex-1 bg-systemBackground">
<View className="flex-row items-center justify-between px-6 pb-4 pt-8">
- <Text className="text-[22px] font-bold text-label">Add a language</Text>
+ <Text accessibilityRole="header" className="text-[22px] font-bold text-label">
+ Add a language
+ </Text>
<Pressable
onPress={onClose}
hitSlop={8}
@@ -294,7 +296,7 @@ function AddLanguageSheet({
autoCorrect={false}
autoCapitalize="none"
className="h-11 rounded-lg bg-secondarySystemGroupedBackground px-4 text-[15px] text-label"
- style={{ fontFamily: SpaceGrotesk.regular }}
+ style={{ fontFamily: AppFont.regular }}
/>
</View>
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/SlowDownloadSheet.tsx b/openwhispr-mobile/src/screens/onboarding/steps/SlowDownloadSheet.tsx
index 9961f80f0..7075ddaeb 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/SlowDownloadSheet.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/SlowDownloadSheet.tsx
@@ -58,7 +58,9 @@ export function SlowDownloadSheet({
className="absolute bottom-0 left-0 right-0 rounded-t-3xl bg-systemBackground px-6 pb-8 pt-3"
>
<View className="mb-4 h-1 w-9 self-center rounded-full bg-separator" />
- <Text className="text-[22px] font-bold text-label">Download taking a while?</Text>
+ <Text accessibilityRole="header" className="text-[22px] font-bold text-label">
+ Download taking a while?
+ </Text>
<Text className="mt-1.5 text-[15px] leading-[20px] text-secondaryLabel">
No need to wait. Continue setup on Cloud now — we&apos;ll finish your Private download
in the background.
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx b/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx
index 631a1bb83..a2de7c6e7 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx
@@ -12,7 +12,7 @@ import { SystemIcon } from '@/components/ui/SystemIcon';
import { useOnboardingPracticeMode } from '@/hooks/useOnboardingPracticeMode';
import { useOnboardingStep } from '@/hooks/useOnboardingStep';
import { BRAND } from '@/config/colors';
-import { SpaceGrotesk } from '@/lib/fonts';
+import { AppFont } from '@/lib/fonts';
import { safeHaptics } from '@/lib/utils';
import { useAuthStore } from '@/store/useAuthStore';
import { addKeyboardStatusChangedListener } from '../../../../modules/app-group-storage/src';
@@ -245,7 +245,7 @@ const styles = StyleSheet.create({
messageInput: {
minHeight: 120,
color: PlatformColor('label') as unknown as string,
- fontFamily: SpaceGrotesk.regular,
+ fontFamily: AppFont.regular,
fontSize: 16,
fontWeight: '400',
lineHeight: 22,
diff --git a/scripts/download-brand-fonts.js b/scripts/download-brand-fonts.js
index 0b68f0961..4c3373523 100644
--- a/scripts/download-brand-fonts.js
+++ b/scripts/download-brand-fonts.js
@@ -1,9 +1,11 @@
#!/usr/bin/env node
// Fetches the licensed Yowza font files from the private OpenWhispr/brand-assets
// release into src/assets/fonts/yowza/, where src/brandFonts.ts picks them up
-// at build time. Blaze Type's EULA forbids redistributing the files, so they
+// at build time. The mobile app passes `--output-dir` to fetch into its own
+// assets instead. Blaze Type's EULA forbids redistributing the files, so they
// are never committed; a build without access skips this step and the UI falls
-// back to Noto Sans. Set BRAND_FONTS_REQUIRED=1 (release CI) to fail instead.
+// back to its bundled font. Set BRAND_FONTS_REQUIRED=1 (release builds) to fail
+// instead.
const fs = require("fs");
const path = require("path");
@@ -19,7 +21,11 @@ const FILES = [
"yowza-soft-std-regular.otf",
"yowza-soft-std-medium.otf",
];
-const FONT_DIR = path.join(__dirname, "..", "src", "assets", "fonts", "yowza");
+const OUTPUT_DIR_INDEX = process.argv.indexOf("--output-dir");
+const FONT_DIR =
+ OUTPUT_DIR_INDEX !== -1 && process.argv[OUTPUT_DIR_INDEX + 1]
+ ? path.resolve(process.argv[OUTPUT_DIR_INDEX + 1])
+ : path.join(__dirname, "..", "src", "assets", "fonts", "yowza");
const REQUIRED = process.env.BRAND_FONTS_REQUIRED === "1";
function resolveToken() {
@@ -39,7 +45,7 @@ function skip(reason) {
console.error(` [brand-fonts] ${reason}`);
process.exit(1);
}
- console.log(` [brand-fonts] ${reason}; the app will fall back to Noto Sans.`);
+ console.log(` [brand-fonts] ${reason}; the app will fall back to its bundled font.`);
}
function apiHeaders(token) {