R
R
rhost2016-05-26 12:45:46
Mobile development
rhost, 2016-05-26 12:45:46

How to connect your fonts to the application?

How can I include my fonts in a React Native app?
I just found that I need to put the font in
projectfolder\android\app\src\main\assets\fonts
recompile the application and everything should work, but in reality nothing works) the
font is called Robregular.ttf
in the code I wrote like this

time: {
        fontFamily:'Robregular',
        fontWeight:'400',
        color:'#fff',
        textAlign:'center',
        fontSize:15,
        marginTop:10,
        paddingBottom:10,
    },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rhost, 2016-05-27
@hoOstel

It turned out that's how we
throw the fonts into the folder (font names must be in lower case !!)
compile and
use

time: {
        fontFamily:'robregular',
        fontWeight:'400',
        color:'#fff',
        textAlign:'center',
        fontSize:15,
        marginTop:10,
        paddingBottom:10,
    },

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question