Open forgeuxGH5 opened 3 years ago
@forgeuxGH5 I would say:
Test both scenerios (with and without an internet connection)
The Relationship team has a ticket they are working on to do this too. The common gov't weasyprint server has BCSans loaded in it, so we could do the same.
One issue with a ref to a non-standard font, is that when customers view their PDF, if it can't find it, or download it fast enough they get crappy font substitution going on.
@thorwolpert - Great. Do we have control over which default system font gets substituted if/when BC Sans doesn't get downloaded fast enough? ie, as mentioned above, can we set Arial as the back up system font should BC Sans fail and if so, can we also map the font weights (ie BC Sans Bold maps to Arial Bold).
I'm not sure on PDFs, I'd have to look into how they do their font substitution. I don't think it's like a FOUT.
Here's what I got so far
The 14 standard PDF fonts are Courier (Regular, Oblique, Bold, Bold Oblique), Helvetica (Regular, Oblique, Bold, Bold Oblique), Times (Roman, Italic, Bold, Bold Italic), Symbol and ITC Zapf Dingbats.
PDF Viewers use their own algorithm to determine the substituted font based on their set of recognizable names. This to me suggest BCSans may not have a reasonable substitute. eg. if it were called something like BC-NotoSans, then possibly viewers would substitute for the know NotoSans font that BC was forked from.
Everyone suggests embedding font to maintain visual fidelity. So we may need to look at how the systems we have create and store PDFS, and then possibly embed the required fonts on delivery, if storage is a problem.
@thorwolpert Is this something that we could investigate after NRO decommision? Can we build our refund and renewal notifications like we currently do for now?
I threw an estimate on it for planning purposes. we can regroom when this ticket is picked up.
De-prioritizing this for now.
Per @thorwolpert "our PDF templates have the the BCGov fonts embedded in them, and they are eating a bunch of storage. It took the notification service offline and backed up into our other systems. Can we look at options? I know it’s a fork of one of the GoogleFonts, but do we really need to use it?"
This ticket is to investigate and hopefully implement an alternative approach to font handling in our pdfs to reduce file size.
Proposed assessment/investigation plan (test the impact/effects of the following):