Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/05/2013, 01:56
dw14
 
Fecha de Ingreso: mayo-2011
Mensajes: 18
Antigüedad: 13 años
Puntos: 0
fonface, solo funciona en el html

Hola,

Estoy teniendo problemas para que el navegador utilice una fuente que declaro en el css mediante @fontface.
La fuente me la descargué de fontsquirrel y no funciona en ningún navegador.

La sintaxis del css es la siguiente

Código CSS:
Ver original
  1. @charset "utf-8";
  2. /* CSS Document */
  3. @font-face {
  4.     font-family: 'ColaborateThinRegular';
  5.     src: url('type/ColabThi-webfont.eot');
  6.     src: url('type/ColabThi-webfont.eot?#iefix') format('embedded-opentype'),
  7.          url('type/ColabThi-webfont.woff') format('woff'),
  8.          url('type/ColabThi-webfont.ttf') format('truetype'),
  9.          url('type/ColabThi-webfont.svg#ColaborateThinRegular') format('svg');
  10.     font-weight: normal;
  11.     font-style: normal;}
  12. @font-face {
  13.     font-family: 'ColaborateLightRegular';
  14.     src: url('ColabLig-webfont.eot');
  15.     src: url('ColabLig-webfont.eot?#iefix') format('embedded-opentype'),
  16.          url('ColabLig-webfont.woff') format('woff'),
  17.          url('ColabLig-webfont.ttf') format('truetype'),
  18.          url('ColabLig-webfont.svg#ColaborateLightRegular') format('svg');
  19.     font-weight: normal;
  20.     font-style: normal;}
  21. body {font-family: 'ColaborateThinRegular'; background-color: #014171; margin: 0; padding: 0}

Para que funcione tengo que poner @fontface en el html, de esta manera

Código HTML:
<!doctype html>
<html lang="gl">
<head>
	<meta charset="UTF-8">
	<title>Documento</title>
	<link rel="stylesheet" type="text/css" href="css/styles.css">	
	<style>@font-face {
    font-family: 'ColaborateThinRegular';
    src: url('type/ColabThi-webfont.eot');
    src: url('type/ColabThi-webfont.eot?#iefix') format('embedded-opentype'),
         url('type/ColabThi-webfont.woff') format('woff'),
         url('type/ColabThi-webfont.ttf') format('truetype'),
         url('type/ColabThi-webfont.svg#ColaborateThinRegular') format('svg');
    font-weight: normal;
    font-style: normal;}</style>
</head> 
Si lo pongo solamente en el css no consigo que se muestre en el navegador