-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External font is not working like Denmark Causten calibri #2779
Comments
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 The fonts I am trying to use are Century Gothic, Proxima Nova, and Helvetica. |
@Ayush2014Kira See this thread: #2756 (comment) |
Yes , after I use google fonts |
i am getting same issue. How can fix this pls let me know anyone. Thanks in advance. |
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: