I’m Trying to add custom fonts in my wordpress development theme but I got fatal error here how i add it
/// Register fonts. wp_register_style('font-awesome', get_stylesheet_uri(), [], filemtime get_template_directory_uri().'/fonts/font-awesome-webfont.woff', [], false, 'all'); wp_register_style('Naskh', get_stylesheet_uri(), [], filemtime get_template_directory_uri().'/fonts/naskh-webfont.woff', [], false, 'all'); wp_register_style('Roboto', get_stylesheet_uri(), [], filemtime, get_template_directory_uri().'/fonts/roboto-webfont.woff', [], false, 'all');
/// Enqueue Fonts. wp_enqueue_style('font-awesome-webfont.woff'); wp_enqueue_style('naskh-webfont.woff'); wp_enqueue_style('roboto-webfont.woff');
and in the css i add it like this
--arabic-fonts:src='\fonts\naskh-webfont.woff'; --english-fonts:src='\fonts\roboto-webfont.woff';
[dir="rtl"] .container {font-family:var(--arabic-fonts);} [dir="ltr"] .container {font-family:var(--english-fonts);}
Please help me Thanks For Your Reply I appreciate it
I tried Google It But Could Not Found Any Possible Fix
Mohamed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.