typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

When exporting to PDF, headers/footers font-size and family are not coherent with the theme

Open raffaeler opened this issue 4 years ago • 6 comments

  • [X] Searched existing issues to avoid creating duplicates.
  • [X] Confirmed that it can be reproduced in built-in themes without customized css.
  • [X] Searched http://support.typora.io/

Describe the bug When exporting to PDF, the header and footer font characteristics (size and font family) are no coherent with the current theme. For example, when using Whitey, the font in the footer is without serifs while Whitey uses serifs (Roman-style).

To Reproduce Steps to reproduce the behavior:

  1. Load a document
  2. Set Whitey theme
  3. Set a footer (tried with both Yaml or preferences)
  4. export to pdf the document

Expected behavior I need to be in control of the font characteristics of the headers and footers which should be coherent with the theme.

Desktop (please complete the following information):

  • OS: Windows 10 64bit

Typora Version 0.11.8

Additional context I tried to "guess" the css class/style whitout luck. I could not find any indication on the documentation about the css name to modify the headers and footers.

raffaeler avatar Oct 10 '21 09:10 raffaeler

Hi @abnerlee I see the other issue is related to encoding. You also linked there a resolved issue on pdf-lib. Could you please tell how those are related to the font size and family? Thanks!

raffaeler avatar Oct 11 '21 08:10 raffaeler

Sorry, not a duplication.

abnerlee avatar Oct 11 '21 08:10 abnerlee

I tried to use Katex in the front-matter to overcome the font-name problem, but it didn't work either.

I believe that it should be enabled the possibility to use the html "class" to specify a css on paragraph as well as the front-matter.

raffaeler avatar Dec 12 '21 09:12 raffaeler

The same problem with the styles of header & footer when exporting PDF using other themes instead of the current one, they were rendered in inconsistent font family and text color. I have also tried to guess the potential CSS elements/classes/ids that may control the style but failed.

However, I found the text color of the header & footer may inherit the current theme's text color (not the exporting theme's). This may be helpful for the issue.

Control and customization of the footer & header are necessary.

Hyperzsb avatar Mar 07 '22 00:03 Hyperzsb

Same problem here. I tried modifying the .css file of the theme to chang the font-size, but also failed. I still cannot change the font size when exporting to PDF.

SoyMark avatar Dec 11 '23 03:12 SoyMark