Custom Fonts Installation and Use in Boost Theme

Custom Fonts Installation and Use in Boost Theme

by Radhakrishnan M S -
Number of replies: 3

I have read the custom fonts installation documentation for moodle 3.5 version and for boost theme.

I  could not follow it  and get the desired results.

I wanted to install a font for the Malayalam(ml) language.

The font file is  AnjaliOldLipi-Regular  and is available in ttf format.

I had converted it to webfonts.

But  I am  not sure where to install these fonts  and change the required settings.

Need help 

Average of ratings: -
In reply to Radhakrishnan M S

Re: Custom Fonts Installation and Use in Boost Theme

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

What documentation did you read?

What did you then do?

What does your code look like?

In reply to Gareth J Barnard

Re: Custom Fonts Installation and Use in Boost Theme

by Radhakrishnan M S -

Thanks for the response.

1.  I referred to the documentation available at the following link 

https://docs.moodle.org/35/en/How_to_add_custom_fonts_in_a_theme

2.  I converted the ttf file into webfonts . An example is  the attached file.

3. But the problem is I do not know where to upload or add this file  and the  CSS code.


The  css code is as follows


@font-face {
font-family: 'AnjaliOldLipi';
src: url('AnjaliOldLipi-Regular.eot');
src: url('AnjaliOldLipi-Regular.eot?#iefix') format('embedded-opentype'),
url('AnjaliOldLipi-Regular.woff2') format('woff2'),
url('AnjaliOldLipi-Regular.woff') format('woff'),
url('AnjaliOldLipi-Regular.ttf') format('truetype'),
url('AnjaliOldLipi-Regular.svg#AnjaliOldLipi-Regular') format('svg');
font-weight: normal;
font-style: normal;
}

Kindly help by providing the details.

In reply to Radhakrishnan M S

Re: Custom Fonts Installation and Use in Boost Theme

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Why are you not using the squared bracket syntax ( [[font:theme|fontname.eot]] etc.) as given in the example?  And the documentation states '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 answer to 'But the problem is I do not know where to upload or add this file'.  And for 'or add this file  and the  CSS code' there is the answer 'In your themes CSS file'.

Average of ratings: Useful (2)