About Custom Font

About Custom Font

by Ultra Max -
Number of replies: 2

Hello I have a question about custom fonts...

I'm Using Moodle (Final Version) And using Academy Theme.

I'm working (Redesigning the theme with custom css) everything is ok I changed everything as needed, but at final stage with custom font I engouraged a small problem..

I added a custom font (font works well) to the theme:

@font-face {

    font-family: BPG Nino Medium Caps;

    src: url([[font:theme|bpg-nino-medium-caps-webfont.woff]]);

}

a {font-family:BPG Nino Medium Caps;}


when I put this code in custom css it automatically applied and changed some text in the site..

I need to change only the text what i want and needed...

Please, suggest me how to solve this task.


Thank you in advanced...


P.S. It would be a perfect if you add "Insert Source Code" Function in this edotor. 

Average of ratings: -
In reply to Ultra Max

Re: About Custom Font

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Max,

If you added...

a { font-family: 'BPG Nino Medium Caps'; }

All this does is make every link use your custom font, as you have found.

So what you need to do is decide which elements you want to change to use that font?

Yes you can add the the font-family inside a <style></style> tag in the HTML Editor when adding text to a course page or other pages that allows you to use the Text Editor.

For example:

<h2 style="font-family:'BPG Nino Medium Caps';">Heading for this course</style>

Is this what you wanted to know?

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: About Custom Font

by Ultra Max -

Mary Evans

Thank you, I removed a { font-family: 'BPG Nino Medium Caps'; } and now working perfectly....

Now I can change font face by inspecting the element in needed region : like

#frontpage-course-list h2 {...

#frontpage-category-names h2 { ... 

etc.