set default font with style.xml

Asked by wobobo83

Dear Adam,

currently I'm using QueXML with Docker and I want to change the default font for every questionnaire from "freeserif" to "freesans".

Is it possible to change and set the default font with the "style.xml" file for the questionnaire?

I've already figured out that I can add the variable "font-family: freesans;" to every listed style, to change the font, but some fonts are still not changed.

Thank you very much for your efforts and please feel free to contact me at any time for further questions.

best regards

Question information

English Edit question
queXML Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Adam Zammit (adamzammit) said :

Apologies for the delayed reply.

You are right that most of the time you can change this in the style.xml file - but the code itself does store a default font for some items that are not "styleable".

To change this you need to edit the quexmlpdf.php class itself - see this code:

 779 /**
 780 * Default font
 781 *
 782 * @var string Defaults to 'freeserif'.
 783 * @since 2010-11-05
 784 */
 785 protected $defaultFont = 'freeserif';

If you are using Docker - you could go into the container and edit the file itself, or copy the quexmlpdf.php file out of the container, make the changes and copy it back - or use a mount to "overwrite" the quexmlpdf.php file that is in use.


Can you help with this problem?

Provide an answer of your own, or ask wobobo83 for more information if necessary.

To post a message you must log in.