NativeBase
NativeBase copied to clipboard
Use 'Courier New' on iOS
Summary
The Courier font was removed in iOS 15. 'Courier New' is available since iPhone OS 3.
Changelog
- [iOS] [Fixed] - Use 'Courier New' font in
Code
andKbd
components
Test Plan
import { Code } from 'native-base'
<Code>App.tsx</Code>
Workaround
Currently, you have to specify font family like so:
<Code _text={{ fontFamily: 'Courier New' }}>App.tsx</Code>
@craftzdog is attempting to deploy a commit to the Geekyants Team Team on Vercel.
A member of the Team first needs to authorize it.
I just ran expo init my-app --template expo-template-native-base
and received this error when running the app:
fontFamily "Courier" is not a system font and has not been loaded through Font.loadAsync.
I'm running iOS 15. This PR seems as if it would solve this issue. Thanks!
why closed? :(
Just for people like me who encounter the same issue after running expo init my-app --template expo-template-native-base
as @stdavis mentioned, directly modify index files in "node_modules/native-base/src/**" like in this PR.
This shouldn't be the best but It shuts up errors in terminals and it helps me not being annoyed by the error til this PR is opened and merged. (keep in mind when you update packages, your modifycation will be removed or maybe this modification doen't do anything)
Hopefully this PR will be open and merged soon!
https://www.npmjs.com/package/patch-package solves the issue of your changes being overwritten when you update your npm packages.
Is there any update on the status of this PR?
Some handy shell scripts while we wait for the PR to be merged
sed -i -e 's/Courier/Courier New/' ./node_modules/native-base/src/components/composites/Code/index.tsx
sed -i -e 's/Courier/Courier New/' ./node_modules/native-base/src/theme/components/code.ts
sed -i -e 's/Courier/Courier New/' ./node_modules/native-base/src/theme/components/kbd.ts
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It would be great if this PR was merged. Is there anything that I can do to help?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.