Alegreya not working in PDF export option

In McLuhan Theme Options, when setting Alegreya as the Header Font in my PDF Options the resulting output is in Times New Roman.

Upon researching this in Custom Styles, I see that the fonts for this option are incorrectly identified as Alegreya Sans SC:

@font-face {
font-family: ‘Alegreya Sans SC’;
src: url(‘fonts/AlegreyaSansSC-Medium.ttf’) format(‘truetype’);
font-weight: normal;
font-style: normal; }

While troubleshooting this problem, I created a custom PDF Style with the correct font identified, but either this font is not installed on the Pressbooks server or it is named differently, because this did not generate a PDF export using Alegreya, but instead defaulted again to Times New Roman.

this custom style did not work to solve the problem:
@font-face {
font-family: ‘Alegreya’;
src: url(‘fonts/Alegreya-Medium.ttf’) format(‘truetype’);
font-weight: normal;
font-style: normal; }

Any assistance in getting Alegreya to output in the PDF export would be appreciated.

Upon further troubleshooting, when I place the Alegreya fonts on my own web server and direct the “src: url” to that location, the PDF outputs correctly with Alegreya as indicated.

The obvious conclusion is that the Alegreya font is not installed in the PB “fonts” directory, and the code which references it therefore fails to execute and substitutes the standard serif font, Times New Roman, in its place.

A PB admin should verify that Alegreya is installed, and the code used for custom styles utilizing Alegreya should be updated from Alegreya Sans SC to match the installed serif font.

Hi @toddhalvorsen – we’ll look into this. Are you willing to file a bug ticket for this issue (details from your diagnostics page would be particularly helpful for us in attempting to replicate the issue): Issues · pressbooks/pressbooks-book · GitHub

Thanks. I’ll look into filing a bug ticket.

@toddhalvorsen We confirmed the bug on our side today and will file the ticket ourselves. My colleague @ThomasWeideman will put a link here once it’s created so you can follow our progress in fixing it. Thanks for bringing it to our attention!

Thanks @toddhalvorsen, I’ve filed a ticket here: Alegreya as Header font replaced by Times New Roman in PDF exports · Issue #932 · pressbooks/pressbooks-book · GitHub