Custom font icon not working Expo 34 after build

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')
      
    });
  }

What versions of expo-font and @expo/vector-icons are you using? Make sure you run expo install to get the latest compatible versions for your SDK

I would take a look at this issue for solutions

I have used these packages
@expo/vector-icons”: “^10.0.1”,
“expo”: “^34.0.3”,
“expo-asset”: “^6.0.0”,
“expo-constants”: “^6.0.0”,
“expo-document-picker”: “^6.0.0”,
“expo-font”: “^6.0.1”,
“expo-image-picker”: “^6.0.0”,
“expo-permissions”: “^6.0.0”,
“react”: “16.8.3”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz”,

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

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.