I am using custom fonts icon. It is working in development but after making build apk it is not working.
It was working in SDK 33 My configuration ** “expo”: “^34.0.3”, “react”: “16.8.3”,
** “react-native”: “https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz”,
import * as React from 'react';
import * as Font from 'expo-font';
import { View } from 'react-native';
import { createIconSetFromIcoMoon } from '@expo/vector-icons';
import icoMoonConfig from '../assets/fonts/config.json';
const Icon = createIconSetFromIcoMoon(icoMoonConfig, 'Icomoon');
export default class FontIcon extends React.Component {
render() {
return (
<View>
<Icon
style={this.props.style}
name={this.props.name}
size={this.props.size}
color={this.props.color}
/>
</View>
);
}
}
**App.js**
async loadFonts() {
await Font.loadAsync({
'Icomoon': require('./assets/fonts/customfonts.ttf')
});
}
I created new project using expo init and moved whole files of old project
“@expo/vector-icons”: “^10.0.3”,
“expo”: “^34.0.3”,
“expo-asset”: “^6.0.0”,
“expo-constants”: “6.0.0”,
“expo-font”: “^6.0.1”,
“expo-permissions”: “^6.0.0”,
“react”: “16.8.3”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz”,
Now custom fonts started working but apk size has been increased from 14 MB to 25 MB
I didn’t added any new package in new build. I made build using expo build:android -t app-bundle bb file size was 47.2 MB after publish app on play store became 25 MB. before this bb file was 30 MB and publish app size was 14 MB
I have raised new issue. Please follow below link. I think unused fonts sizes increasing the size of app