MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Using different fonts in Sigil (https://www.mobileread.com/forums/showthread.php?t=211645)

JamieS 04-26-2013 12:08 PM

Using different fonts in Sigil
 
Hi all,

Newbie question coming up. I need to have two different fonts in a book I've written and wasn't looking forward to uploading fonts and dealing with stylesheets as I have no experience with these.

But when I copied and pasted by word document with both fonts into Sigil, created chapters and a TOC and then converted the epub into a mobi everything comes out fine when I read the book in my Kindle reader.

So why do I need to upload fonts or create a style sheet? Am I missing something?

Thanks in advance,

Jamie

theducks 04-26-2013 12:30 PM

Quote:

Originally Posted by JamieS (Post 2494915)
Hi all,

Newbie question coming up. I need to have two different fonts in a book I've written and wasn't looking forward to uploading fonts and dealing with stylesheets as I have no experience with these.

But when I copied and pasted by word document with both fonts into Sigil, created chapters and a TOC and then converted the epub into a mobi everything comes out fine when I read the book in my Kindle reader.

So why do I need to upload fonts or create a style sheet? Am I missing something?

Thanks in advance,

Jamie

You may not need to include fonts for things to work.
The device may support Your chosen font
The device falls back to a system font (an you did not notice the difference)

Stylesheets allow CONTROL in a common (usually single) place instead of willy-nilly through out the document. This allow a Single change to revise the look and feel of your work.

What happens if you decided the font, foo.ttf, you chose for Chapter Headings looked really bad on a small display? Without a stylesheet, you would need to locate and change each and every use to the new choice.
With a stylesheet, you simply make the change once.

Do take time and learn basic CSS. The stylesheet need not be complex. K.I.S.S. will work well here :thumbsup:

mrmikel 04-26-2013 04:44 PM

Find a book you like in the MR library. Three Men in a Boat is a good choice and look at any special formatting you like. Switch to code view and see what they used to get it. Then switch over to the stylesheet view for the code you just saw. Then go to w3schools.com for a further explanation if you need one.

For many books you don't need extra fonts at all. The plainest of books won't need much in the way of a stylesheet either. But as you get more familiar with epubs you will likely want to be able to make chapter titles nicer looking etc.

exaltedwombat 04-27-2013 03:13 PM

Quote:

Originally Posted by JamieS (Post 2494915)
Hi all,

Newbie question coming up. I need to have two different fonts in a book I've written and wasn't looking forward to uploading fonts and dealing with stylesheets as I have no experience with these.

If you're preparing an ebook, stylesheets are your friend! I strongly suggest you GET some experience with them! Otherwise you'll be including manual code for e.g. every occurance of an un-indented first paragraph. And for every change of font. Messy and laborious.

Just about every reader device has a default serif font and a sans-serif one. Will these do as your two fonts?

exaltedwombat 04-27-2013 03:17 PM

Quote:

Originally Posted by mrmikel (Post 2495192)
Find a book you like in the MR library. Three Men in a Boat is a good choice and look at any special formatting you like. Switch to code view and see what they used to get it.

But be careful. Unless your ebook is for JUST you, on JUST one particular device, a lot of the clever stuff won't always work. Let alone if you convert a Kindle version - and if you are distributing the ebook that's a market you'd be foolish to ignore.

teh603 04-27-2013 10:26 PM

Quote:

Originally Posted by exaltedwombat (Post 2496070)
If you're preparing an ebook, stylesheets are your friend! I strongly suggest you GET some experience with them! Otherwise you'll be including manual code for e.g. every occurance of an un-indented first paragraph. And for every change of font. Messy and laborious.

Agreed. If you're like me and don't use CSS very often, bookmark a CSS reference website and use it when you're making that stylesheet. It'll save you a ton of headache later on.

Although from how the Smashwords style guide reads, it makes me wonder if people even use Word and OO/LO stylesheets very often. Too much direct formatting, perhaps?

Quote:

Just about every reader device has a default serif font and a sans-serif one. Will these do as your two fonts?
I always embed two- a serif text font and a title/heading one. Both FOSS and licensed for commercial use.

exaltedwombat 04-28-2013 05:28 AM

Quote:

Originally Posted by teh603 (Post 2496514)
I always embed two- a serif text font and a title/heading one.

Why? What's wrong with the device's default serif text font? It will have been carefully selected for readability.

Jellby 04-28-2013 05:46 AM

And moreover, what's wrong with the font the user might have selected as preferred font ;)

roger64 04-28-2013 12:45 PM

Hi

A compromise solution would be to offer a reversible choice of fonts. I mean to propose some font which seems to go well with your formatting, but that can be easily overriden by user's choice.

The problem is that I can only test this kind of solution with Kobo Glo.

Hitch 04-28-2013 09:24 PM

Quote:

Originally Posted by JamieS (Post 2494915)
Hi all,

Newbie question coming up. I need to have two different fonts in a book I've written and wasn't looking forward to uploading fonts and dealing with stylesheets as I have no experience with these.

But when I copied and pasted by word document with both fonts into Sigil, created chapters and a TOC and then converted the epub into a mobi everything comes out fine when I read the book in my Kindle reader.

So why do I need to upload fonts or create a style sheet? Am I missing something?

Thanks in advance,

Jamie


Jamie:

Likely, it worked because, through sheer happenstance, the two "fonts" you called via Word, called in the in-line html, are also on the actual Kindle devices. For example: Times New Roman and Trebuchet, or something along those lines. If you had called, say, a Cyrillic font you'd put on your computer, or, say, Linux Libertine Ligatures--well, that would be a different story. Then, on your Kindle, you would see little blank boxes where the letters should go. In fact, I have a screenshot of a Kindle2 screen I took, to prove to someone insisting that I was a moron ebook-maker, because I couldn't magically make a book in Russian for Amazon ("...because there are already books in Russian on Amazon! So you must not know what you are doing!" I was not able to explain to to him that the books worked on K8 devices, but not K7. Just didn't want to hear me.).

(If you want to see what an image of an unsuccessful called font looks like on a Kindle, just say so. Happy to show you.) If the font you request isn't available, the device will simply choose one from amongst those available, or, worst case, display little empty boxes. A lot depends on the encoding, etc.

I hope that makes sense to you.

Hitch

DrChiper 04-29-2013 12:55 PM

You can also embed fonts (be sure to use open source fonts and not commercial ones!) in your epub's in combination with an appropriate style sheet to force your e-reader to use that fonts only. It makes your epub bigger in size though, and your e-reader must be able to handle those font formats (.otf, .ttf) but when it really complies to the OPS 2.x standard, it will work.

JamieS 05-03-2013 04:39 AM

Thanks for all the great responses. Yup, I was using Helvitica and New Courier in my word document. The first for the main text of my story and the New Courier to represent a manuscript that one of my characters reads within the story (if that makes sense).

I do want to get familiar with CSS and stylesheets but there's so much else to do write, design cover, proof,promote etc I'm going to take a short cut this time if I can!

Having said that thank you for the advice of looking at how other books use CSS. I should have thought of that.

Also

Quote:

Agreed. If you're like me and don't use CSS very often, bookmark a CSS reference website and use it when you're making that stylesheet. It'll save you a ton of headache later on.
Can you suggest a CSS reference website you like in particular?

So what I'm seeing at the moment, both on my Kindle and Ipad, is the main text (which was Helvitica) now showing up as whichever user font I choose in the device and the New Courier showing as itself and not changeable...which is exactly what I want.

Can anyone forsee a reason why I might come unstuck using my epub as it is without further addition?

Thanks again, great stuff.

Jamie

DaleDe 05-04-2013 08:34 PM

Our own wiki can serve as a beginners guide and reference guide to CSS and if you wish to improve then it is easy to do.

Dale

BobC 05-10-2013 08:00 AM

Always worthwhile to specify a "fallback" font in case the reader doesn't have the one you wanted :

Code:

p {
        font-family: Georgia, serif;
        font-weight: normal;
        text-indent: 1em;
        text-align: justify;
        line-height: 120%;
        margin-bottom: .5em;
        margin-left: 0.5em;
}
h1,h2,h3 {
        font-family: Arial, sans-serif;
        text-align: center;
}

Here the reader should use Georgia for normal text but if it isn't there it should use a generic serif font. For headers its Arial then a generic sans-serif font.

BobC

JamieS 05-17-2013 03:57 AM

Thanks guys, great stuff

Notjohn 05-17-2013 07:21 AM

Quote:

Originally Posted by JamieS (Post 2502028)
Thanks for all the great responses. Yup, I was using Helvitica and New Courier in my word document. The first for the main text of my story and the New Courier to represent a manuscript that one of my characters reads within the story (if that makes sense).

There is a particular problem with the Kindle Paperwhite, which will represent Courier correctly only if you call for both courier and monospace. This is my style for a monospace paragraph:

p.block {
font-family: courier, monospace;
text-indent: 1em;
text-align:left;
margin:0em 0em 0em 1em;
}

My full style sheet is here: http://notjohnkdp.blogspot.com/searc...&max-results=7


All times are GMT -4. The time now is 06:55 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.