![]() |
#16 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
No problem Paul, it's a pleasure helping you !
Assuming you are trying to go along the way of embedding the fonts, you would put all the three fonts in the content/resources folder. Then, you'd edit the CSS file to add references to your fonts as in : Code:
@font-face {font-family: "LiberationSans";font-weight: normal;font-style: normal;src: url(LiberationSans-Regular.ttf);} @font-face {font-family: "FontinSans";font-weight: normal;font-style: normal;src: url(Fontin_Sans_R_45b.otf);} @font-face {font-family: "Droid";font-weight: normal;font-style: normal;src: url(DroidSerif-Regular.ttf);} Code:
h1 { font-family: "Droid", serif; } h2 { font-family: "FontinSans", sansserif; } p { font-family: "LiberationSans", sansserif; } David. |
![]() |
![]() |
![]() |
#17 | |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
Paul said in a private message to me :
Quote:
And yes, the TTF files were manually inserted into the ePub file. Take care, though, because the ePub specification is very sensitive about the zipping of the content (as said here : "This container is generally a zip file but the extension has been renamed to .epub. It has special requirements by including an uncompressed mime type file while the rest of the data in the file is compressed"). I usually use a program named Total Commander (here) which is capable of going into a ZIP file without extracting it, and add/delete/edit files inside... It's a shareware though, but I'm pretty sure there are other means to generate a valid ePub file from its expanded contents. So, what I do (step by step) is :
Hope this helps, David. |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Captain Courageous
![]() ![]() Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
|
Yes, I think I have it now. Thanks for the step by step! I'm going to save this thread to my computer so I can refer to it. I get as big a blast out of customizing these old books as I do in reading them on my 505!
![]() Paul |
![]() |
![]() |
![]() |
#19 |
Captain Courageous
![]() ![]() Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
|
David, embedding the fonts this way, do I still have to specify a custom css file with --override-css ?
Thanks, Paul |
![]() |
![]() |
![]() |
#20 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
The --override-css option is there to generate a CSS file that is tailored to your needs.
If you follow the step-by-step explanations in my previous post, this option is not necessary, because you'll be modifying the CSS files manually. But you can also skip the CSS-editing steps and include all the needed information in the --override-css option. It's your choice, and in the end the result is the same... Cheers, David. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Captain Courageous
![]() ![]() Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
|
David, I still can't get this thing to work. I downloaded "Total Commander" and used it to modify the index_calibre_2.css file. I added the somewhat cryptic @font-face line and my h1, addition. I also added the one font I was using Fiolex Girls(flx.ttf) to the file. I only changed the title font for this test.
I have uploaded the epub file to my website. Will you please check it out? www.handleys.us/pride.epub Thanks, Paul |
![]() |
![]() |
![]() |
#22 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
Hi Paul,
I checked your file, and somehow you didn't use the font you included anywhere in the CSS files ; you should include a font-family command in one of the elements defined in the CSS. From what I understood of your aim, it should be in h1 : Code:
h1 { font-family: "Fiolex Girls", serif; } Code:
h1 {font-size: 18pt} David. |
![]() |
![]() |
![]() |
#23 |
Captain Courageous
![]() ![]() Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
|
Duh? Yep! I think I should specify the font huh?
![]() Thanks David. That did the trick. I appreciate you helping me. I love the control that Calibre gives me. Paul ![]() |
![]() |
![]() |
![]() |
#24 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
You're welcome Paul, I'm happy to help and glad it eventually worked out !
|
![]() |
![]() |
![]() |
#25 |
Captain Courageous
![]() ![]() Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
|
Say David, is there anything that will open and allow edit of LRF file?
Paul |
![]() |
![]() |
![]() |
#26 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You can use lrf2lrs to convert the LRF into LRS and then use a text editor to edit the LRS and then lrs2lrf to convert back. These are Calibre programs.
|
![]() |
![]() |
![]() |
#27 |
Captain Courageous
![]() ![]() Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
|
Thanks, wolf. Yeah I did some searching after I posted and found a website that told me that. New Problem:
I open the resulting lrs file in "xml marker". There is no clear-cut tag that would say(for example) <h1> {font-family..etc I see "Blockstyle and a code, like 388 and "Textstyle and 389. I see nothing that indicates what might be a font for the title anywhere. First I took an epub file that I had modified with David's help and converted it to LRF, then I used this as input to lrf2lrs. I then opened the lrs file in "Xml marker". I know the font I had put in there and that the modification worked, but I can't locate a reference to it in the LRS file. Also, only the table of contents got converted, Heaven only knows where the rest of it went! Thanks, Paul |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Combining font styles into single ttf file | sherman | Sony Reader Dev Corner | 4 | 04-24-2009 09:21 PM |
feed to lrf, how do I change font (or have default font) | lovemov | Calibre | 3 | 03-16-2009 10:57 PM |
Changing default font in Mobipocket? | smp_iliad | iRex | 1 | 02-12-2009 09:46 PM |
iLiad Changing the default sound | ericshliao | iRex Developer's Corner | 4 | 12-21-2008 12:05 PM |
Font changing sizes... | rixte | Bookeen | 5 | 12-19-2007 05:58 PM |