On a related issue, dompdf doesn't ship with DejaVu Sans in CiviCRM. Given that this is set as the default font would it not make sense to ship the font too?
See #2126 (closed). It doesn't ship because of size reasons, but is the default because it's needed for unicode. Note the install docs have a section about installing it.
(DejaVu DOES get installed though with drupal 9 since the install process pulls directly from the original source.)
I agree though maybe the fallback should be sans-serif.
Thank you for raising an issue to help improve CiviCRM. As you may know, this issue has not had any activity for quite some time, so we have closed it.
We would like you to help us to determine if this issue should be re-opened:
If this issue was reporting a bug, can you attempt to reproduce it on a latest version of CiviCRM?
If this issue was proposing a new feature, can you verify if the feature proposal is still relevant? Did it get the concept-approved label? Have other people also shown interest? Could it be implemented as an extension?
If the answer to either question is yes, please feel free to comment or re-open the issue. Please also consider:
Is it something that you could help implement, either by sending a patch or hiring someone who can?
Thank you for your help and contributions to CiviCRM.
P.S. This is an automated message, see infra/gitlab issue 20. We understand that automatic responses are annoying, but given the number of open issues as the project evolves, we need a bit of help to triage and prioritise the most relevant issues.
@wmortada - I was just looking at this as it's a v quick fix to make the serif fallback sanserif, but when I go to print something, the print.css file doesn't seem to be loading at all. My whole print preview looks like unstyled HTML:
I checked on dmaster demo and get the same, so am wondering if it's the same for you?
@nicol what is it that you are printing? It looks like you are printing a screen from CiviCRM - the event participant screen? I don't think the stylesheet is used for this. It is used to print letters to members etc. E.g. from the contact summary screen go to Actions > Print/Merge document.
Okay, I see, there is a 'Print Window' icon in the top right of the dialog. I don't think I've ever noticed that icon or used it before . (Not sure how useful this button is but perhaps other people use it?)
I get the same as you in the browser but the PDF version does apply the styles (e.g. the buttons are not displayed). Given that this stylesheet is for media="print" that is as expected.
However, I'm less concerned about users being able to print the CiviCRM screens as I don't think that's a very common use case. I'm more concerned about users being able to print letters and documents.
Yeh I don't really see why there are print icons on the modals tho I remember a wider issue about it at some point. I just tested printing a letter to PDF and it was sans-serif but maybe I've got DejaSans somewhere.
If it's just to change 'serif' to 'sans-serif' am happy to review/upvote that PR?