Home New Guten › Forums › WoodMart support forum › Font from TaypeKit
Font from TaypeKit
- This topic has 3 replies, 2 voices, and was last updated 7 years, 1 month ago by
Artem Temos.
-
AuthorPosts
-
June 22, 2018 at 5:14 pm #64362
ludnikoParticipantHi, I would like to use a font which is not on google Fonts (DIN FONT) and Im using this code on the custom css
@font-face {
font-family: ‘Din’;
src: url(‘http://www.convitemezcal.com/fonts/din.eot’); /* IE9 Compat Modes */
src: url(‘http://www.convitemezcal.com/fonts/din.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
url(‘http://www.convitemezcal.com/fonts/din.woff’) format(‘woff2’), /* Super Modern Browsers */
url(‘hhttp://www.convitemezcal.com/fonts/din.woff’) format(‘woff’), /* Pretty Modern Browsers */
url(‘http://www.convitemezcal.com/fonts/din.ttf’) format(‘truetype’), /* Safari, Android, iOS */
url(‘http://www.convitemezcal.com/fonts/din.svg#Din’) format(‘svg’); /* Legacy iOS */
}
.textoDIN72 {font-family: ‘Din’; font-size:72px; color:#ffffff;}but it is not working, also Im trying to use custom fonts and upload the .woff, .eot, svg and .ttf and it says that it is forbidden to upload those files
Attachments:
You must be logged in to view attached files.June 22, 2018 at 7:44 pm #64388
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file and upload again
add_filter( 'upload_mimes', 'woodmart_upload_mimes', 100, 1 ); function woodmart_upload_mimes( $mimes ) { $mimes['svg'] = 'image/svg+xml'; $mimes['svgz'] = 'image/svg+xml'; $mimes['woff'] = 'font/woff'; $mimes['woff2'] = 'font/woff2'; $mimes['ttf'] = 'font/ttf'; $mimes['eot'] = 'font/eot'; $mimes['svg'] = 'font/svg'; $mimes['woff'] = 'application/x-font-woff'; $mimes['ttf'] = 'application/x-font-ttf'; $mimes['eot'] = 'application/vnd.ms-fontobject'; }
June 22, 2018 at 8:55 pm #64403
ludnikoParticipantI just tried and it didn’t work, this is what I have on my child functions.php
<?php
/**
* Enqueue script and styles for child theme
*/
function woodmart_child_enqueue_styles() {
wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘woodmart-style’ ), woodmart_get_theme_info( ‘Version’ ) );
}
add_action( ‘wp_enqueue_scripts’, ‘woodmart_child_enqueue_styles’, 1000 );add_filter( ‘upload_mimes’, ‘woodmart_upload_mimes’, 100, 1 );
function woodmart_upload_mimes( $mimes ) {
$mimes[‘svg’] = ‘image/svg+xml’;
$mimes[‘svgz’] = ‘image/svg+xml’;
$mimes[‘woff’] = ‘font/woff’;
$mimes[‘woff2’] = ‘font/woff2’;
$mimes[‘ttf’] = ‘font/ttf’;
$mimes[‘eot’] = ‘font/eot’;
$mimes[‘svg’] = ‘font/svg’;
$mimes[‘woff’] = ‘application/x-font-woff’;
$mimes[‘ttf’] = ‘application/x-font-ttf’;
$mimes[‘eot’] = ‘application/vnd.ms-fontobject’;
}Attachments:
You must be logged in to view attached files.June 22, 2018 at 9:04 pm #64408
Artem TemosKeymasterPlease, send us your FTP access so we can check it.
-
AuthorPosts
Tagged: typekit
- You must be logged in to create new topics. Login / Register