08-07-2010, 07:18 PM | #1 |
Addict
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;} |
08-07-2010, 10:00 PM | #2 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
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%} |
Advert | |
|
08-08-2010, 12:57 AM | #3 |
Addict
Posts: 234
Karma: 40
Join Date: Apr 2010
Device: The Nook, iPad
|
Thanks, I actually just noticed on the on Look & Feel tab, you can specify line height by points which worked for me.
|
08-08-2010, 01:02 AM | #4 |
Addict
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.
|
Thread Tools | Search this Thread |
|
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 |