iou90 / react-native-autoheight-webview

An auto height webview for React Native
ISC License
492 stars 162 forks source link

How change font-family (font-family.ttf from assets) of react-native -autoheight-webview #183

Closed lamaj411 closed 4 years ago

lamaj411 commented 4 years ago

How change font-family of react-native webview using font-family.ttf from assets, please show some example code

hanzoow commented 3 years ago

Is this solved ? i need solution.

yuuk commented 1 year ago

Pass remote css file to source.html is a solution, But i think is not good.

<AutoHeightWebView
    customStyle={`body{font-family: 'your-custom-font'}`}
    source={{
        html: `<link rel="stylesheet" href="remote-font-css-url.css" /><p>example</p>`,
    }}
/>