react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

[Bug]: Fontello - Image does not appeat and android < 9

Open GaelCO opened this issue 6 months ago • 5 comments

Which package are you using?

@react-native-vector-icons/*

What platform(s) does this occur on?

Android

What happened?

Version : "@react-native-vector-icons/fontello": "^12.0.1",

On old version of android, icons do not appear (blank). I reproduced this issue on android 7.1 and 8.1. On 9.0, the icons appear normally.

For information, I use my own icons with this code : ` import createIconSet from '@react-native-vector-icons/fontello'; import customIconConfig from './config.json';

export const CustomFontIcon = createIconSet(customIconConfig);

export default CustomFontIcon; `

Relevant log output


Minimal reproducible example

No response

Your computer environment

System:
  OS: Linux 6.11 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
  CPU: (16) x64 AMD Ryzen 7 7730U with Radeon Graphics
  Memory: 14.82 GB / 30.66 GB
  Shell:
    version: 5.2.21
    path: /bin/bash
Binaries:
  Node:
    version: 22.11.0
    path: ~/.nvm/versions/node/v22.11.0/bin/node
  Yarn:
    version: 4.9.2
    path: ~/.nvm/versions/node/v22.11.0/bin/yarn
  npm:
    version: 10.9.0
    path: ~/.nvm/versions/node/v22.11.0/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java:
    version: 17.0.15
    path: /usr/bin/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: 18.0.0
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.3
    wanted: 0.79.3
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false

GaelCO avatar Jun 16 '25 10:06 GaelCO

@GaelCO Are they blank or do you get a question mark?

Do you know if this ever worked? i.e. did it used to work with v10 of RNVI? Or is this a new project?

johnf avatar Jun 16 '25 10:06 johnf

Nothing appears (not question mark). No one had reported this issue to me before. I guess it worked before I upgraded to v12. I could try to revert to v10 and v11 for test

GaelCO avatar Jun 16 '25 12:06 GaelCO

Can you check adb logcat for errors

My suspicion is that those android versions don't like the ttf file.

Do any of the other RNVI fonts work?

johnf avatar Jun 16 '25 12:06 johnf

Hi, I test with others RNVI versions on android 8.1

  • V10 : icons appear
  • V11 : icon do not appear.

I haven't tested it with other fonts yet.

GaelCO avatar Jun 16 '25 14:06 GaelCO

I don't see any trace related to RNVI in logcat

GaelCO avatar Jun 16 '25 14:06 GaelCO

@GaelCO Could you try using V11 but copy the fotn file from v10 into the right place. I'm wondering if something changed in our ttf?

johnf avatar Jul 12 '25 13:07 johnf

When I tried to use the copy of the v10 font with version 12.1.0, I realized that I was misconfiguring the font. For Android, the font was manually placed in the Android assets/fonts folder. So, I don't think this issue is due to the .ttf file itself.

I modified it to follow the documentation and let rnvi manage the font location for Android. The result is the same as before.

To be sure, where do you want me to replace the .ttf

GaelCO avatar Jul 15 '25 12:07 GaelCO

Im encountering the same issue. Fontello format font using .ttf font file does not render on android.

nhoffmann-fts avatar Jul 17 '25 13:07 nhoffmann-fts

I should mention im on Android 14, react 18.2, react-native 73.3

nhoffmann-fts avatar Jul 17 '25 14:07 nhoffmann-fts

@GaelCO Are you able to a repro I can use to test this myself?

johnf avatar Jul 17 '25 18:07 johnf

Hi, I create a new project with rn 0.80.1 and rnvi 12.1.0 to give you a repro, but I am not reproducing this display issue. The problem must be with my project configuration. I will investigate.

GaelCO avatar Jul 18 '25 08:07 GaelCO

I found the origin of the problem in my configuration. It came from the fact that I had a dependency on expo for certain libraries.

To test, I replaced all the dependencies to expo libraries, Since then, I no longer have any problems displaying the icons.

GaelCO avatar Sep 03 '25 14:09 GaelCO

@GaelCO Thanks for following up

johnf avatar Sep 09 '25 08:09 johnf