Search code examples
htmlcssfontspyrocmspyro

How can i add fonts in Pyrocms?


I have a static html layout with JS,CSS,Images and Fonts. Now my client wants this to be in Pyrocms. As I'm working in Pyro for the first time, I'm relying on document and can't find a place to place fonts. Like the document says I'm able to add CSS, JS and image folder only.

Any idea on where i can put my fonts into ?

Moreover do Pyro support .scss format ?


Solution

  • you can use the @font-face CSS at-rule to insert the custom font in your work.

    you can define the below lines of code in CSS file; And after that you've to place the specific font on specific folder, for example in your case lets upload the fonts on CSS folder.

    @font-face {
        font-family: 'MyWebFont';  
        src: url('css/webfont.eot'); /* IE9 Compat Modes */
        src: url('css/webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
             url('css/webfont.woff') format('woff'), /* Modern Browsers */
             url('css/webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
             url('css/webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
        }