Comments (10)
@benjick no, sorry.
from nativebase.
Including custom font is easy.
-
Create a
fonts
folder in the project root. -
Add this to
package.json
"rnpm": {
"assets": [
"fonts"
]
}
rnpm link
You already have a similar procedure when installing the react-native-vector-icons
dependency without the need of modifying package.json
so something cleaner could be achieved.
from nativebase.
Sounds cool. Will try it out and hopefully publish it with our next release. Appreciate the help. Thanks!
from nativebase.
Just setting the font as a variable won't be of much help. We'll have to include the .ttf file separately for each custom fonts. So that is not something we're looking to support in the near future. However if you do need a different font, this article might be of some help.
https://medium.com/@dabit3/adding-custom-fonts-to-react-native-b266b41bff7f#.mzhtf14we
from nativebase.
Thanks I know how to include and use custom fonts.
What I'd like to know is how to apply that font to all NativeBase widgets.
from nativebase.
Provided you use all the <Text>
components from native-base for your app. You can define the font-family in Components/Widgets/Text.js.
from nativebase.
Oh ok, I was hoping there was a way to do that from the theme.
Maybe you could mark this as a feature request?
from nativebase.
There is already a custom font request. Since we want native-base to work out of the box, we can have a font variable, but how do you suggest we deal with the problem of manually adding font files?
from nativebase.
Same as #23
from nativebase.
@PierBover Doesn't seem to link the fonts in iOS (0.41), got another solution you're aware off?
from nativebase.
Related Issues (20)
- Type error when run jest test
- SSRProvider warning HOT 2
- Unable to find modules after install and yarn start the react-native cli HOT 3
- Modal Accessibility Issue in UWP
- [Select] customize the content of the Select component HOT 2
- Multiple Modals - Only on iOS the new modal appears below the first Modal HOT 1
- SSRProvider it`s not necessary in React18 HOT 1
- <Item> tag not working
- How to get theme in React Class Components ?
- Why does toast.isActive() only take effect when placement is set to bottom
- Error in React 18
- Select with InputLeftElement
- In React 18, SSRProvider is not necessary and is a noop. HOT 1
- Base style extendTheme for Button component does not work
- onPress triggers twice, when activated via Enter key
- Disabled Button is not WCAG accessible and there is no way to set alternative color with themes other than using opacity.
- when use the useToast, state value is initialized
- Codesandbox demo broken
- Demo doesn't work in Expo snack
- Menu placement is wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativebase.