| Summary: | Cannot change font | ||
|---|---|---|---|
| Product: | [Applications] Arianna | Reporter: | Maverick <ericgathirua> |
| Component: | general | Assignee: | Carl Schwan <carl> |
| Status: | ASSIGNED --- | ||
| Severity: | normal | CC: | catalyst |
| Priority: | NOR | ||
| Version First Reported In: | 25.04.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Maverick
2025-05-04 10:34:53 UTC
This is confirmed. From my investigation thus far, I think it has to do with the switch over to foliate-js and foliate-js is not being told to change the font settings. I have a fix but i need to test more to make sure it is the proper fix. In function applyStyle in EpubViewerPage, change userStyleshet to this:
userStylesheet: Config.usePublisherFont ? '' : `
body {
font-size: ${fontSizePt}pt !important;
font-family: "${fontFamily}" !important;
}
p { font-size: inherit !important; }
`,
That will inject the chosen font settings into the rendered output. This does have a caveat, if you make the font too big for your screen, the arianna has no scrollbar for the main foliate rendering widget and text will simply get chopped off the screen.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/arianna/-/merge_requests/86 The merge request was cancelled, as the font settings do not get injected when invert colors is on. If invert colors is off it works fine. I will fix that here soon. Okay, after going deep into this, there were several bugs in invert colors mode keeping the font settings from changing. In fact, invert mode was fundamentally broken. There were also fatal javascript errors such as a dispatch to resize when the backend wasn't setup. The invert colors mode was calling theme.inverted when no theme.inverted existed, thus breaking font changes when invert mode was on and causing a fatal javascript error. I did refactor a lot of the CSS, and it appears font rendering works as expected, and now color inverting works as expected. No javascript errors are displayed on the console when a book is loaded. |