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

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


    Create a new directory in your theme and call it fonts. Then add all your custom fonts into this directory.
* Cree un nuevo directorio (carpeta) dentro de su tema y póngale por nombre fonts. Por ejemplo: moodle/theme/sutema/fonts
    eg: moodle/theme/yourtheme/fonts/
* Añádale a este directorio todos sus tipos de letra (''fonts'') personalizados.
   
* Dentro del archivo CSS de sus temas añada lo siguiente:
    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-face { /* where FontName and fontname represents the name of the font you want to add */
       font-family: 'FontName';
       font-family: 'FontName';
Línea 16: Línea 15:
     }
     }
      
      
    Next ADD the name of your font wherever you want that font to be used in your stylesheet.
* Después añada el nombre de su tipo de letra en donde Usted quiera que se use ese tipo de teltra en su hoja de estilo (''stylesheet'')
    For example:
* Por ejemplo:
     #page-header h1 { font-family: FontName;}
     #page-header h1 { font-family: FontName;}


[[Category:Temas]]
[[Categoría:Temas]]
 
[[en:How to add custom fonts in a theme]]
[[en:How to add custom fonts in a theme]]

Revisión del 13:50 18 abr 2015

  • Cree un nuevo directorio (carpeta) dentro de su tema y póngale por nombre fonts. Por ejemplo: moodle/theme/sutema/fonts
  • Añádale a este directorio todos sus tipos de letra (fonts) personalizados.
  • Dentro del archivo CSS de sus temas añada lo siguiente:
   @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;
   }
   
  • Después añada el nombre de su tipo de letra en donde Usted quiera que se use ese tipo de teltra en su hoja de estilo (stylesheet)
  • Por ejemplo:
   #page-header h1 { font-family: FontName;}