MobileRead Forums

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

EditorOne 04-16-2012 10:38 PM

Formatting fonts in Sigil
 
I seem to be only able to use the Sigil default font--a non-serif that looks like Arial. The Book Browser shows a Font folder, but I have yet to figure out how to add a usable font to it. Because Windows Vista will not let me access the Fonts Folder (even though everyone who uses this computer has permissions), I downloaded some new fonts that I did not add to the System Fonts folder. Adding them to the Book Browser fonts folder has done nothing. Nothing in the Sigil menu changes when fonts are added to the folder, so HOW do you tell Sigil to reformat any text into the selected font family in the folder????

Is it necessary then, to only upload documents to Sigil that have fonts embedded in them? I've tried that, but Sigil always changes them to unformatted text . . . That includes uploading from Word and from InDesign.

With Sigil, are we limited to their default formatting options? No possibility to provide headings and chapter titles in an alternate font size and style? :blink:

Toxaris 04-17-2012 03:50 AM

You can use different fonts in Sigil. The fonts folder in Sigil has nothing to do with the fonts folder of Vista. It is a folder within the ePUB.

In short, the procedure is as follows:
1. Upload the font you need in Sigil. It will appear in the fonts folder in Sigil.
2. Create in your stylesheet the definitions of the font via the @font-face class
3. Define in your stylesheet that the font is used for example in headers

Step 1 is simple. The other steps are defined at various steps here already if you search. A nice description is at the site of Liz Castro.

You can do almost everything within Sigil with regards to fonts and styles via stylesheets. However, you must use Code View and do it yourself via CSS and XHTML. Bookview is very limited in functionality and will not allow you to change fonts and alike.

EditorOne 04-17-2012 06:11 PM

Thanks for your speedy response. I think my learning curve is still pretty steep as I'm not really very good with CSS so I'll have to figure out how to do the style sheet. I think I did manage to upload a font to Sigil, but then I didn't know what to do with it. Thanks for the link to Liz Castro. That will help.

huebi 04-18-2012 03:12 AM

Its the same with an image. Appending an image to the ePub with Sigil does not show the image at all - whereas it is still in the ePub. You have to use it somewhere in your (x)html files to be shown up. Same with fonts - adding them does not change anything at all. You have to use them in your CSS. Basic knowledge in XHTML and CSS is necessary for creating books with Sigil.

roger64 04-18-2012 03:34 AM

Hi

Embedded fonts are usually introduced in CSS stylesheets by a @font-face declaration.

I would like to stress a point that may confuse some beginner. Sigil ask you to be consistent: be careful to write the font family names on other parts of your stylesheet exactly in the same way as in your font-face declaration. This concerns single quotes.

Single quotes are not compulsory for fonts with a one word name like Arial; or even LibertineOCRegular. You can either use then or not. It's optional.

Times New Roman, on the other hand is a font name which includes two whitespaces and which must be written between quotes. It's compulsory.

But, if you use single quotes in one place for a font name, use single quotes everywhere. Sigil cares for consistency. You can't really complain about it but you must be aware of it.

http://code.google.com/p/sigil/issues/detail?id=1358

Here above, you'll find an attached EPUB file which has no validation problem either with Epubcheck or FlightCrew. ADE displays the true small capitals, Sigil does not, precisely because of this single quotes discrepancy.

You also can check how it displays on ADE as there, sometimes, can be, for me, unexplained differences.
Have a look at this book for example: http://efele.net/ebooks/livres/000163/index.html
L'homme au masque d'or and download the epub version (not the epub-) and compare Sigil and ADE displays. I would be keen to have some comments on this.

This is an advice. :)

KatyPerryFan4Eva 03-19-2016 09:54 AM

Quote:

Originally Posted by Toxaris (Post 2045744)
You can use different fonts in Sigil. The fonts folder in Sigil has nothing to do with the fonts folder of Vista. It is a folder within the ePUB.

In short, the procedure is as follows:
1. Upload the font you need in Sigil. It will appear in the fonts folder in Sigil.
2. Create in your stylesheet the definitions of the font via the @font-face class
3. Define in your stylesheet that the font is used for example in headers

Step 1 is simple. The other steps are defined at various steps here already if you search. A nice description is at the site of Liz Castro.

You can do almost everything within Sigil with regards to fonts and styles via stylesheets. However, you must use Code View and do it yourself via CSS and XHTML. Bookview is very limited in functionality and will not allow you to change fonts and alike.

And how exactly would I do the code in the CSS stylesheet for a font I want in speech for example? Sorry, it's just that I'm only just learning. :help:

DiapDealer 03-19-2016 11:16 AM

I'm sorry, but it seems you need to master some basic HTML/CSS first before tackling this sort of thing. Sigil can't really help you in this regard until you understand those underlying concepts first.

Also, please consider starting new threads for your questions. I can appreciate that you're trying to use the search function to find relevant threads, but unless those threads are fairly recent, just start a new one. Threads like this one were made when Sigil was an entirely different program. There's also no guarantee that the people you're quoting/asking are even around to answer any more. So if the thread is more than a few months old, please consider starting a new one for your question. And please take the advice of others to become familliar with some basic HTML/CSS before tackling some of these more advanced subjects.

Turtle91 03-19-2016 09:45 PM

There is a lot of good learning to be had at the W3Schools. Here is one of the pages that covers Font Face. http://www.w3schools.com/cssref/css3...-face_rule.asp

I would highly recommend walking through a couple of their tutorials in order to get an idea of what's going on. After you do that, this might make more sense:

in css:
Code:

@font-face {
    font-family: Bodebeck;
    src: url("../Fonts/Bodebeck.ttf");
        font-style: normal
}
@font-face {
    font-family: "Sloops Two";
    src: url("../Fonts/Sloops.ttf");
        font-style: normal
}

h2 {font-family:Bodebeck, serif}
p.first {font-family:"Sloops Two", sans-serif}

and in html:
Code:

<h2>Chapter 3</h2>
<p class="first">There once was a man from Nantucket.</p>


Pablo 03-20-2016 08:48 AM

For basic HTML, CSS and ePub concepts, you may find my Quick and Dirty ePub Tutorial useful (see my signature).


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.