You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onst styles = StyleSheet.create({
container: {
width: "100%",
height: window.innerHeight,
},
body: {
paddingTop: 10,
paddingBottom: 130,
paddingHorizontal: 35,
fontSize: 12,
fontFamily: "Ageo-Italic",
},)
in this code apply font is not working only roboto font working
how to any other font add in this code
The text was updated successfully, but these errors were encountered:
Ayush2014Kira
changed the title
External font is not wokring
External font is not working like Denmark Causten calibri
Jun 5, 2024
I have a problem like this too. I have a project that has been using react-pdf successfully with various fonts but now, after one of the last few updates, they no longer work.
I don't think it necessarily has to do with the font type, since I tried a few different fonts of various types like .otf, .ttc, and .ttf and many did not work. From my limited testing, it seems that only specific fonts work.
The fonts I am trying to use are Century Gothic, Proxima Nova, and Helvetica.
import RobotoMedium from "../../../../assets/fonts/Roboto/Roboto-Medium.ttf";
import RobotoBold from "../../../../assets/fonts/Roboto/Roboto-Bold.ttf";
import Denmark from "../../../../assets/fonts/Denmark/DENMARK.ttf";
import CaustenExtraBold from "../../../../assets/fonts/Causten/CaustenExtraBold.ttf";
import CalibriBold from "../../../../assets/fonts/calibri/CalibriBold.ttf";
import CalibriRegular from "../../../../assets/fonts/calibri/CalibriRegular.ttf";
Font.register({
family: "Ageo-Regular",
src: RobotoMedium,
fontWeight: 400,
});
Font.register({
family: "Ageo-Bold",
src: RobotoBold,
fontWeight: 700,
});
Font.register({
family: "Denmark",
src: Denmark,
});
Font.register({
family: "CaustenExtraBold",
src: CaustenExtraBold,
});
Font.register({
family: "CalibriBold",
src: CalibriBold,
});
Font.register({
family: "CalibriRegular",
src: CalibriRegular,
});
Font.register({
family: "Ageo-Italic",
src: AgeoItalic,
fontWeight: 400,
});
onst styles = StyleSheet.create({
container: {
width: "100%",
height: window.innerHeight,
},
body: {
paddingTop: 10,
paddingBottom: 130,
paddingHorizontal: 35,
fontSize: 12,
fontFamily: "Ageo-Italic",
},)
in this code apply font is not working only roboto font working
how to any other font add in this code
The text was updated successfully, but these errors were encountered: