Diferencia entre revisiones de «Como añadir fonts personalizados dentro de un tema»

De MoodleDocs
m (tidy up)
(tidy up)
Línea 1: Línea 1:
{{Pendiente de traducir}}
{{Pendiente de traducir}}


     Create a new directory in your theme and call it fonts. Then add all your custom fonts in this directory.
     Create a new directory in your theme and call it fonts. Then add all your custom fonts into this directory.
     eg: moodle/theme/yourtheme/fonts/
     eg: moodle/theme/yourtheme/fonts/
      
      

Revisión del 13:45 18 abr 2015

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)


   Create a new directory in your theme and call it fonts. Then add all your custom fonts into this directory.
   eg: moodle/theme/yourtheme/fonts/
   
   In your themes CSS file add the following:
   @font-face { /* where FontName and fontname represents the name of the font you want to add */
     font-family: 'FontName';
     src: url([[font:theme|fontname.eot]]);
     src: url([[font:theme|fontname.eot]]) format('embedded-opentype'),
          url([[font:theme|fontname.woff]]) format('woff'),
          url([[font:theme|fontname.ttf]]) format('truetype'),
          url([[font:theme|fontname.svg]]) format('svg');
     font-weight: normal;
     font-style: normal;
   }
   
   Next ADD the name of your font wherever you want that font to be used in your stylesheet.
   For example:
   #page-header h1 { font-family: FontName;}