I'm trying to make a Certificate primarily in Chinese, but the characters always display as ? marks. I've tried putting the zh_cn folder into the lang subfolder of the certificate mod, as well as other measures, and the certificate just refuses to render the Chinese characters properly. Does anybody know how to get Chinese characters to show up in the certificate?
you can have 2 different problems with characters in the certificate module
- problem with strings that come from the database (course or activity name, student name)
- problem with strings that come from the lang files (but I don't think you should use your own files because certificate is entirely translated in chinese (zh_cn, see AMOS at http://lang.moodle.org) so if you go to site administration language and update your lang pack the latest version should be automatically donwloaded.
so that we can help you, can you tell us with what characters you have a problem ?
- characters from database
- characters from lang files
Also if you use a customized certificate,, can you verify if it has a line like
I forgot something very important, you must specify a font that include the chinese characters you want (helvetica and times don't include these characters !) or obviously they won't print !
sorry for my late reply but I want to share my solution in the hope it will be helpful to others.
Download the 3 files:
and put them into the folder
Then use the font DroidSansFallback in your certificate_print_text function!
certificate_print_text($pdf, $x, $y + 50, 'C', 'DroidSansFallback', '', 30, fullname($USER));