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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-08-2011, 11:52 AM   #1
dicknskip
Zealot
dicknskip began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Nov 2009
Location: Okotoks, AB, Canada
Device: iPad V-3
Embedded fonts

I would like to be able to insert hand writing like script output in an ePub file. I downloaded the free Elegant.ttf file. I added this to the Fonts directory of my ePub file. In my stylesheet.css I added the following code:

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

p.letter {font-family: "Elegant"; margin: 20px 40px 20px 40px; text-indent: 0; border: none; padding: 0px;}

And then I created a test file with a <p class="letter">text text text</p> in it. It does not appear as script. It appears as the normal Sigil font. What have I done wrong?
dicknskip is offline   Reply With Quote
Old 11-08-2011, 12:11 PM   #2
cuthbert19
Enthusiast
cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.
 
Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
Try it out (the resulting EPUB file, I mean) in ADE or another reading system (other than calibre's ebook-viewer), it's probably the known bug of QTWebKit (upon which Sigil and calibre both based their rendering system).
cuthbert19 is offline   Reply With Quote
 
Enthusiast
Old 11-08-2011, 12:32 PM   #3
dicknskip
Zealot
dicknskip began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Nov 2009
Location: Okotoks, AB, Canada
Device: iPad V-3
I loaded the file onto my PRS-505 and got the same result as Sigil and E-book-reader. I guess I'm doing something really silly in here some place.
dicknskip is offline   Reply With Quote
Old 11-08-2011, 01:48 PM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,906
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Did you check the case? The stuff is case sensitive. Another thing that sometimes is forgotten, did you declare the stylesheet in your page?
Toxaris is offline   Reply With Quote
Old 11-08-2011, 02:20 PM   #5
dicknskip
Zealot
dicknskip began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Nov 2009
Location: Okotoks, AB, Canada
Device: iPad V-3
The name of the .ttf file is Elegant with a cap E. When I open the font in the font viewer (Kubuntu Linux) the title seems to be "Elegant, Thin". Do I need the ", Thin" part. I'll try it anyway. I have the link in the file to the .css. I've been caught by that in some other files.

Last edited by dicknskip; 11-08-2011 at 02:58 PM. Reason: WORKED: It was "Elegant, Thin" PS: the QTWebKit issue also gets you. I had to restart my system to see the correct font.
dicknskip is offline   Reply With Quote
Old 11-08-2011, 04:58 PM   #6
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 644
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
Quote:
Originally Posted by dicknskip View Post
@font-face {font-family: "Elegant"; font-style: normal; font-weight: normal; src:url("Fonts/Elegant.ttf");}
try "../Fonts/Elegant.ttf" as it may not be finding font in correct path.
Perkin is offline   Reply With Quote
Old 11-08-2011, 05:19 PM   #7
Keroberos
Zealot
Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.
 
Keroberos's Avatar
 
Posts: 127
Karma: 194002
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
+1 to changing to "../Fonts/Elegant.ttf", that's the format I use in my ePubs.
Keroberos is offline   Reply With Quote
Old 11-08-2011, 05:50 PM   #8
dicknskip
Zealot
dicknskip began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Nov 2009
Location: Okotoks, AB, Canada
Device: iPad V-3
I'll give the ../ prefix a try the next time I need a script font. It's not very often. Thanks
dicknskip is offline   Reply With Quote
Old 11-08-2011, 11:00 PM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,809
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
I'm glad you worked it out.

Next time you find the solution and edit a post to let us all know, as you did in post 5, update the actual post so folks can easily see that you found a solution. The small edit box is the reason for editing, not the actual edit.

Something like the following:

Quote:
Update: Issue resolved. It was "Elegant, Thin" PS: the QTWebKit issue also gets you. I had to restart my system to see the correct font.
DoctorOhh is online now   Reply With Quote
Old 11-10-2011, 01:25 PM   #10
dicknskip
Zealot
dicknskip began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Nov 2009
Location: Okotoks, AB, Canada
Device: iPad V-3
OK - I got this to work on Calibre's ebook-viewer and in Sigil. As soon as I move it through Calibre to my PRS-505 the script is gone and I get a serif font in very small type.

Here is the css code:

@font-face {font-family: "Elegante, Regular"; font-style: normal; font-weight: normal; src:url("res:///Fonts/elegital.ttf");}

I didn't like how light the other font was so I changed to Elegante.

When I save the epub and then open it again in Sigil the res"///Fonts gets changed to ../Fonts

The definition of class letter is:

p.letter {font-family: "Elegante, Regular"; font-size:65%; line-height:225%; margin: 20px 40px 20px 40px; text-indent: 0; border: none; padding: 0px;}

I have a couple of lines of text defined as <p class="letter">. In Sigil it is in Elegante script. In the ebook-viewer it is Elegante script. On the PRS-505 it is the default serif font, but very small, this is due to the font-size and line-height in the css.

Can anyone see what I'm doing wrong here?
dicknskip is offline   Reply With Quote
Old 11-10-2011, 04:30 PM   #11
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
I think the problem is in the path. As other people mention above in the css code it should be written:

src:url(../Fonts/elegital.ttf);

I use this in my PRS-650 for embedded fonts and it works fine.

Alternatively, sometimes instead of embedding the fonts in the ePub file I create a folder called 'Fonts' in the root of the internal memory of the reader and save the fonts there. Then the syntax used in the css is:

src: url(res:///Data/Fonts/elegital.ttf);

And don't forget that css is case sensitive!

I hope it will help.
sellew is offline   Reply With Quote
Old 11-10-2011, 05:03 PM   #12
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
If you want a more detailed info about working with fonts I found this pdf in the forum:
http://www.mobileread.com/forums/att...id=58204&d=...
It has been really useful to me.

And regarding the font size I can say that in my experience 65% looks really small in the reader. Even for notes I never use a size below 75%, most often something around 80-90%.
sellew is offline   Reply With Quote
Old 11-11-2011, 07:21 AM   #13
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,906
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
As paragraph font size I always use 1em and use the sizing option of the reader if I want to have it bigger or smaller.
Toxaris is offline   Reply With Quote
Old 11-11-2011, 09:53 AM   #14
dicknskip
Zealot
dicknskip began at the beginning.
 
Posts: 110
Karma: 10
Join Date: Nov 2009
Location: Okotoks, AB, Canada
Device: iPad V-3
I played with the font size like that because I found that the long risers and tails on the style overlapped from line to line. I did go a little far and will clean that up once I get the font to show on the reader. We have company for the next two days so I won't get back to fiddling with this until Sunday. Thanks for all the help so far.
dicknskip is offline   Reply With Quote
Old 11-11-2011, 03:59 PM   #15
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
May be you can also try playing with the line-height, increasing it more, to avoid the overlapping.
sellew 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
Embedded fonts? Greenmantle Kobo Reader 66 07-27-2011 08:20 PM
Embedded fonts not always visible James_Wilde ePub 15 12-15-2010 12:19 PM
Problem with embedded fonts James_Wilde ePub 25 09-24-2010 04:07 PM
Embedded fonts, Calibre, and choice of fonts AlexBell ePub 8 05-30-2010 06:00 AM
iPad Embedded Fonts JSWolf Apple Devices 24 04-26-2010 02:41 PM


All times are GMT -4. The time now is 01:26 AM.


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