Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

footer font #4458

Closed
ghost opened this issue Jan 7, 2019 · 5 comments
Closed

footer font #4458

ghost opened this issue Jan 7, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 7, 2019

  • KOReader version:
  • Device: kobo aura one
    Hello,
    I would like to change the font of the footers.
    How to proceed?
    thank you
@Frenzie
Copy link
Member

Frenzie commented Jan 7, 2019

By the footer, do you mean the status bar?

@ghost
Copy link
Author

ghost commented Jan 7, 2019

20190107_104400 1
20190107_104400 1

@ghost ghost closed this as completed Jan 7, 2019
@Frenzie
Copy link
Member

Frenzie commented Jan 7, 2019

Oh, that's the footnote? Today's nightly includes #4454.

Pinging @poire-z because I don't recall otoh if the popup footnote has a custom CSS mechanism as well.

@poire-z
Copy link
Contributor

poire-z commented Jan 7, 2019

No custom CSS in frontend/ui/widget/footnotewidget.lua, only a hardcoded one.
And the font size does not come from it, it's the one provided as the default font size to MuPDF.

-- We may use a font size a bit smaller than the document one (because
-- footnotes are usually smaller, and because NotoSans is a bit on the
-- larger size when compared to other fonts at the same size)
local font_size = self.doc_font_size - 2

@davicraquette : you can try changing the -2 here. Use -5 or -8 if you want it smaller.
As in my comment in that code, it looks like your main font is on the smaller side of fonts :) Or your book has some CSS that make that body text smaller, and we won't be able to know when deciding for the font size of footnotes popup...

We could add a manual setting if needed:
local font_size = self.doc_font_size - 2 + (G_reader_setting.readSetting("footnote_popup_font_size_diff") or 0)
or do some ugly font metric calculations (which may be wrong anyway given metrics quality) to find the best NotoSans font size to use... but again, this will still suck if the book has p {font-size: 90%}

@poire-z
Copy link
Contributor

poire-z commented Jan 15, 2019

Changing font size will soon be possible with a new menu item, see #4482.

Changing the font itself (to answer https://www.mobileread.com/forums/showthread.php?t=313043 too) is more complicated:

-- If we wanted to use the default font set for the book,
-- we'd need to add a few functions to crengine and cre.cpp
-- to get the font files paths (for each font, regular, italic,
-- bold...) so we can pass them to MuPDF with:
-- @font-face {
-- font-family: 'KOReader Footnote Font';
-- src: url("%1");
-- }
-- @font-face {
-- font-family: 'KOReader Footnote Font';
-- src: url("%2");
-- font-style: italic;
-- }
-- body {
-- font-family: 'KOReader Footnote Font';
-- }
-- But it looks quite fine if we use "Noto Sans": the difference in font look
-- (Sans, vs probably Serif in the book) will help noticing this is a KOReader
-- UI element, and somehow justify the difference in looks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants