I’m needing to print a barcode in a Expo (React Native) App. I’ve tried to require the tff file (see below), but this does not work for me. If I use the same methodology to include an image, however, it works fine.
try {
const fontAsset = Asset.fromModule(require('@/assets/fonts/LibreBarcode39-Regular.ttf'));
const fontBase64 = await manipulateAsync(fontAsset.localUri ?? fontAsset.uri, [], {base64: true});
}catch(e){
console.log("Error loading font: " + e)
}