View Single Post
Old 08-18-2023, 12:52 PM   #1
Zillion_
Enthusiast
Zillion_ began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jul 2023
Device: KindleOasis10thGen
KFX: reduce default body line height on Kindle

Hello,

I'm baffled by this issue.
Have been trying every trick I can think of to try to reduce the line height for the body of text in KFX files on Calibre.

Nothing works.
Well, some things seem to work in the Calibre Viewer, but the kindle overrides the line spacing for the body text to 1.2 (or to something that visually equates to the default 1.2 setting).

I've tried:
- setting line-height in CSS for Calibre, Body, and pagestyles
- using Extra CSS, including with "!important"

example:
Code:
.calibre {
  display: block;
  padding-left: 0;
  padding-right: 0;
  text-align: justify;
  margin: 0;
  text-indent: 0;
  font-size: 1em;
  margin-left: -1.0em !important;
  margin-right: -1.0em !important;
  line-height: 0.9 !important;
}
.Body {
  display: block;
  text-align: justify;
  text-indent: 0;
  margin-top: 0.3em;
  margin-bottom: 0.3em;
  font-size: 1em;
  line-height: 0.9 !important;
}

- using CSS Transforms
- setting min line height in % in "Look & Feel"
- setting line height fixed in pixels in "Look & Feel"

The only change I get is that the line spacing is reduced for e.g. headings or other kinds of paragraphs.
But never for the Body text.
I can change the line spacing for headings, titles etcs. But the body text, again, sometimes it seems to work in the Calibre viewer, but on the Kindle it doesn't change. Apart from the spacing between majors and minor headings, or the spacing above or below headings which does get reduced.

Somehow the Kindle overrides whatever I try.

Anybody got any idea ? Or should I just give up trying to change this (and I'd like to keep using KFX...)...

(if you wonder why I set negative left & right margins, that's to reduce the default page margins on Kindle, I find them way too big. I don't want to do that in my source EPUB file, so I do it in the KFX during conversion).
Zillion_ is offline   Reply With Quote