prettydoc icon indicating copy to clipboard operation
prettydoc copied to clipboard

woff, woff2 for regular, italic, bold and bolditalic with scss changes for cayman

Open maybegeek opened this issue 4 years ago • 3 comments

woff and woff2 (latin-extended)

for regular, italic, bold and bolditalic with scss changes for cayman theme.

Perhaps you want to try this out.

thanks, christoph

maybegeek avatar Jan 23 '21 19:01 maybegeek

Thanks for the patch. Note that the fonts are used by all themes, so I would suggest keeping the existing font files and use consistent file names for other newly added font faces. Also I'm not sure whether it is necessary to include both WOFF and WOFF2. I guess pandoc will include both files in the generated HTML document, making the output unnecessarily large.

yixuan avatar Jan 26 '21 02:01 yixuan

Hi @yixuan,

*.woff or *.woff2

*.woff2 should be enough, you are right, we do not need both (*.woff and *.woff2). Using *.woff2 is not a progressive enhancement anymore, it is widely used and exclusively used (https://developers.google.com/fonts/docs/css2). So: woff2 should be enough, I removed the Open Sans *.woff previously included.

naming scheme

I use the naming scheme from google-webfonts-helper, but any other should do too. I read your comment on keeping existing font files, but that would add more file size mixing woff and woff2.

italic, bold-italic and latin-extended

The Open Sans is a widely used font-family ... using the real italic and real bold-italic makes it better.

changed scss for all themes

I changed the corresponding scss-files to target the 4 *.woff2 files.

I hope you can test this and hope it will meet your ideas, thanks

maybegeek avatar Jan 26 '21 09:01 maybegeek

Cool! I'm a bit busy these days, but I'll look at the PR more carefully as soon as I get some time.

yixuan avatar Jan 26 '21 11:01 yixuan