typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 56 forks source link

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

Open raffaeler opened 3 years ago

raffaeler commented 3 years ago

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):

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 commented 3 years ago

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!

abnerlee commented 3 years ago

Sorry, not a duplication.

raffaeler commented 2 years ago

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.

Hyperzsb commented 2 years ago

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.

SoyMark commented 11 months ago

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.

bush911 commented 2 months ago

Same here. After exporting to PDF, font size in footnotes becomes very very small.