Problème utilisation police personnalisée fontface

Fermé
cactuss42 Messages postés 13 Date d'inscription vendredi 2 mai 2014 Statut Membre Dernière intervention 19 octobre 2015 - 21 déc. 2014 à 14:42
Phoenix186 Messages postés 31 Date d'inscription jeudi 28 août 2014 Statut Membre Dernière intervention 18 avril 2016 - 2 janv. 2015 à 15:29
Bonjour,

Je cherche à mettre une police spéciale sur mon site, téléchargée sur https://www.fontsquirrel.com/ dans tous les différents formats. Mais je ne comprends pas pourquoi ça ne marche pas. Si quelqu'un pouvait m'aider..


Mon code dans mon css :

@font-face {
font-family: 'ostrich-light';
src: url('ostrich-light-webfont.eot');
src: url('ostrich-light-webfont.eot?#iefix') format('embedded-opentype'),
url('ostrich-light-webfont.woff') format('woff'),
url('ostrich-light-webfont.ttf') format('truetype'),
url('ostrich-light-webfont.svg#sansationbold') format('svg');

}

h1
{
font-family: 'ostrich-light';
}
A voir également:

3 réponses

fiddy Messages postés 11069 Date d'inscription samedi 5 mai 2007 Statut Contributeur Dernière intervention 23 avril 2022 1 840
21 déc. 2014 à 17:45
Bonjour,
Visiblement il n'y a pas de lien avec le C++. Je redirige dans la bonne catégorie.

Cdlt,
0
JonathanMoreau
22 déc. 2014 à 17:19
Bonjour Cactus,

Je peux vous aider :)

Pouvez-vous me fournir les fichiers html / css / font afin que je puisse vous aider ?

Merci.
0
Phoenix186 Messages postés 31 Date d'inscription jeudi 28 août 2014 Statut Membre Dernière intervention 18 avril 2016 3
2 janv. 2015 à 15:29
Il faut écrire :

@font-face { 
	font-family: 'ostrich-light'; 
	src: url('ostrich-light-webfont.eot') format('embedded-opentype'),
	url('ostrich-light-webfont.svg') format('svg'),
	url('ostrich-light-webfont.woff') format('woff'),
	url('ostrich-light-webfont.ttf') format(truetype); 
} 

h1 
{ 
font-family: 'ostrich-light'; 
}


N'oubliez pas d'indiquer le chemin exact des fonts (genre "css/fonts/myfont.ttf").
0