Using a Theme Font in Certificate Moodle 2.9.3

Using a Theme Font in Certificate Moodle 2.9.3

by Dave Emsley -
Number of replies: 1

Hi There,


I have a font called 'Champagne & Limousines' in my theme and would like to use it within the certificate - mainly for the course name.

In my theme's css I have:

@font-face {
font-family: 'Champagne & Limousines';
font-style: normal;
font-weight: normal;
src: url([[font:theme|ChampLim.woff]]) format('woff');
}

...and it works well in the theme but if I put the name into certificate.php I get an error.

certificate_print_text($pdf, $x, $y + 90, 'C',   'Champagne & Limousines' , '', 48, format_string($course->fullname));


Can anyone explain what I really should have done.


Cheers


Dave



Average of ratings: -
In reply to Dave Emsley

Re: Using a Theme Font in Certificate Moodle 2.9.3

by Chris Collman -
Picture of Documentation writers

Hi Dave,

That is a good one.   I suspect it is not a PDF font. 

Floyd Saner wrote this about installing custom fonts for PDFs in certificate here.  I could not remember the name of the pdf generator:  TCPDF.  Kudos to Fred!

Guessing this is enough of a hint to get you on the right path.

Chris