Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-07-2010, 07:18 PM   #1
Sylver
Addict
Sylver began at the beginning.
 
Posts: 234
Karma: 40
Join Date: Apr 2010
Device: The Nook, iPad
How to increase the line space in CSS

Hi, I am converting txt files to epub for reading on the nook using Calibre. As I need to use my own fonts for the Chinese, I put the following script into the .css box to have it use my own fonts that I put on the sd card. Everything works well except the space between the lines is to small (literally each line is followed immediately by another line without any space), I changed the font size in the nook and the space between lines does not change at all. I am sure it's a simple edit on the script that follows, but have no idea how to set it, can someone help? many thanks.

@font-face {
font-family: "MSYaHei";
font-weight: normal;
font-style: normal;
src: url(res:///sdcard/font/msyh.ttf);
}
@font-face {
font-family: "MSYaHei";
font-weight: bold;
font-style: normal;
src: url(res:///sdcard/font/msyhbd.ttf);
}

body { font-family: "MSYaHei", serif;}
Sylver is offline   Reply With Quote
Old 08-07-2010, 10:00 PM   #2
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,205
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
I know nothing about Chinese fonts but you could try adding a line-height to the body element e.g

Code:
body { font-family: "MSYaHei", serif; line-height:200%}
...then play about with the 200% until it suits.
jackie_w is offline   Reply With Quote
Advert
Old 08-08-2010, 12:57 AM   #3
Sylver
Addict
Sylver began at the beginning.
 
Posts: 234
Karma: 40
Join Date: Apr 2010
Device: The Nook, iPad
Quote:
Originally Posted by jackie_w View Post
I know nothing about Chinese fonts but you could try adding a line-height to the body element e.g

Code:
body { font-family: "MSYaHei", serif; line-height:200%}
...then play about with the 200% until it suits.
Thanks, I actually just noticed on the on Look & Feel tab, you can specify line height by points which worked for me.
Sylver is offline   Reply With Quote
Old 08-08-2010, 01:02 AM   #4
Sylver
Addict
Sylver began at the beginning.
 
Posts: 234
Karma: 40
Join Date: Apr 2010
Device: The Nook, iPad
After unzip the compiled file and checked the css, it says "line-height: 1.5em;", I used base font size of 16 and put in the line-height as 24 which is exactly 1.5 times of the base font. Not sure what "em" stands for, but it does make sense. Thanks again, Jackie_w.
Sylver is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS for line breaks after dashes? JaneFancher Sigil 4 04-05-2010 12:18 PM
Strange increase in contrast mmmkay Sony Reader 12 12-17-2009 11:40 PM
How to increase picture size? luqmaninbmore PocketBook 1 11-13-2009 08:40 PM
price increase ? Loopy65 Bookeen 7 06-24-2008 05:41 PM
I can not increase the size or the letters Treomaniaco Sony Reader 4 02-01-2008 06:03 PM


All times are GMT -4. The time now is 10:22 PM.


MobileRead.com is a privately owned, operated and funded community.