react-pdf/renderer library throws error Could not resolve font for Arial,Helvetica,sans-serif, fontWeight 400
i'm getting this error only in production environment in local environment it is working fine.
also i can't find the CDN or font file for font family "Arial,Helvetica,sans-serif",
is this possible if i give a name of another font family and CDN of another font family in Font.register
method.
here is my code snippet.
Font.register({
family: 'Arial,Helvetica,sans-serif',
src: "https://fonts.googleapis.com/css2?family=Roboto&display=swap",
fontWeight: '400',
fontStyle: 'bold',
format: 'truetype',
});
const styles = StyleSheet.create({
container: {
display: "flex",
flexDirection: 'row',
borderBottomColor: borderColor,
backgroundColor: borderColor,
borderBottomWidth: 1,
alignItems: 'center',
alignContent: 'center',
height: 24,
textAlign: 'left',
fontStyle: 'bold',
fontWeight: '400',
flexGrow: 1,
},
});