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 05-15-2013, 08:44 AM   #1
Moonraker
Addict
Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.
 
Moonraker's Avatar
 
Posts: 290
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, PRS-505, Kindle 3,Kobo Glo, Kobo Aura HD
Embedded font problem

Why does my WC3 validation for stylesheet give me the following errors?:

5 Property src doesn't exist : url('../Fonts/alkaios-regular.ttf')
13 .alkaios Property src doesn't exist : url('../Fonts/alkaios-regular.ttf')

but the font displays correctly in Desktop Adobe Digital Editions.

I want to use this font for some Romanian characters.

The code in my css sheet is:

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

.alkaios {
font-family: "alkaios";
font-weight: normal;
font-style: normal;
src: url('../Fonts/alkaios-regular.ttf');
}

The @fontface declaration is the first in the CSS stylesheet.

I have been hours trying to figure this out.
Moonraker is offline   Reply With Quote
Old 05-15-2013, 08:57 AM   #2
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Try removing src:... From the .alkaios {} definition.....I don't think it is needed/allowed there.

Also try double quotes around the URL in the font face: url("....") that shouldn't matter but is something to try.
Turtle91 is offline   Reply With Quote
Old 05-15-2013, 09:08 AM   #3
Moonraker
Addict
Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.
 
Moonraker's Avatar
 
Posts: 290
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, PRS-505, Kindle 3,Kobo Glo, Kobo Aura HD
Quote:
Try removing src:... From the .alkaios {} definition.....I don't think it is needed/allowed there.

Also try double quotes around the URL in the font face: url("....") that shouldn't matter but is something to try.
After removing the url as you said I just get one error:

Property src doesn't exist : url("../Fonts/alkaios-regular.ttf")

Single or double quotes makes no difference but the font is still displaying correctly in ADE.

I'm stumped!
Moonraker is offline   Reply With Quote
Old 05-15-2013, 09:46 AM   #4
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,910
Karma: 5880479
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
This was copied from a working @font
Code:
src:url(../Fonts/CharisSILR.ttf)
Note: No quotes
theducks is online now   Reply With Quote
Old 05-15-2013, 10:06 AM   #5
Moonraker
Addict
Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.
 
Moonraker's Avatar
 
Posts: 290
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, PRS-505, Kindle 3,Kobo Glo, Kobo Aura HD
Quote:
This was copied from a working @font
Code:

src:url(../Fonts/CharisSILR.ttf)

Note: No quotes
Actually, I put the file through Calibre who moved the following to the page_style.css sheet:

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

Note -- no quotes but I still get the same error from WC3

Property src doesn't exist : url(../Fonts/alkaios-regular.ttf)

I've given up now because the ePub is displaying correctly.

Although, I would be interested to know why it is erroring if anybody knows.
Moonraker is offline   Reply With Quote
Old 05-15-2013, 10:08 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,713
Karma: 18475602
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
My working embedded font code has no quotes of any kind in the source line.
JSWolf is offline   Reply With Quote
Old 05-15-2013, 10:10 AM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,713
Karma: 18475602
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Moonraker View Post
Actually, I put the file through Calibre who moved the following to the page_style.css sheet:

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

Note -- no quotes but I still get the same error from WC3

Property src doesn't exist : url(../Fonts/alkaios-regular.ttf)

I've given up now because the ePub is displaying correctly.

Although, I would be interested to know why it is erroring if anybody knows.
I know what the problem is. If you are using Sigil to submit the CSS for validation, then it will fail because Sigil is using CSS version 2 validation instead of version 3 validation. Version 3 validation will validate @font. Version 2 will not.

Also, the CSS code you last posted is correct. It's the validation that's getting it wrong.
JSWolf is offline   Reply With Quote
Old 05-15-2013, 10:26 AM   #8
RbnJrg
Evangelist
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 461
Karma: 318996
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Moonraker View Post
Why does my WC3 validation for stylesheet give me the following errors?:

5 Property src doesn't exist : url('../Fonts/alkaios-regular.ttf')
13 .alkaios Property src doesn't exist : url('../Fonts/alkaios-regular.ttf')

but the font displays correctly in Desktop Adobe Digital Editions.

I want to use this font for some Romanian characters.

The code in my css sheet is:

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

.alkaios {
font-family: "alkaios";
font-weight: normal;
font-style: normal;
src: url('../Fonts/alkaios-regular.ttf');
}

The @fontface declaration is the first in the CSS stylesheet.

I have been hours trying to figure this out.
I think the error message is due to a bad definition of the class .alkaios. Try with this definition:

.alkaios {
font-family: "alkaios";
font-weight: normal;
font-style: normal;
}

You don't have to include (in that class) "src: url('../Fonts/alkaios-regular.ttf');". That is because "src" is not a valid property for a class (is a valid property for a @font definition).
RbnJrg is offline   Reply With Quote
Old 05-15-2013, 10:30 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,713
Karma: 18475602
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by RbnJrg View Post
I think the error message is due to a bad definition of the class .alkaios. Try with this definition:

.alkaios {
font-family: "alkaios";
font-weight: normal;
font-style: normal;
}

You don't have to include (in that class) "src: url('../Fonts/alkaios-regular.ttf');". That is because "src" is not a valid property for a class (is a valid property for a @font definition).
What you are suggesting is incorrect.

Code:
@font-face {
font-family: alkaios;
font-style: normal;
font-weight: normal;
src: url(../Fonts/alkaios-regular.ttf);
}
That is correct and if you had read my message, you would notice that it is Sigil's fault for using the wrong CSS validation version.
JSWolf is offline   Reply With Quote
Old 05-15-2013, 10:42 AM   #10
Moonraker
Addict
Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.
 
Moonraker's Avatar
 
Posts: 290
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, PRS-505, Kindle 3,Kobo Glo, Kobo Aura HD
Quote:
I know what the problem is. If you are using Sigil to submit the CSS for validation, then it will fail because Sigil is using CSS version 2 validation instead of version 3 validation. Version 3 validation will validate @font. Version 2 will not.

Also, the CSS code you last posted is correct. It's the validation that's getting it wrong.
Yes, I did validate from within Sigil.

Thank you J.S. Wolf. I didn't know what version of CSS validation Sigil used.
Moonraker is offline   Reply With Quote
Old 05-15-2013, 10:44 AM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,713
Karma: 18475602
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Moonraker View Post
Yes, I did validate from within Sigil.

Thank you J.S. Wolf. I didn't know what version of CSS validation Sigil used.
Happy to help.
JSWolf is offline   Reply With Quote
Old 05-15-2013, 03:46 PM   #12
RbnJrg
Evangelist
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 461
Karma: 318996
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
What you are suggesting is incorrect.

Code:
@font-face {
font-family: alkaios;
font-style: normal;
font-weight: normal;
src: url(../Fonts/alkaios-regular.ttf);
}
That is correct and if you had read my message, you would notice that it is Sigil's fault for using the wrong CSS validation version.
JSWolf, I'm afraid that you didn't read what I wrote. I said that the CLASS .alkaios was bad defined, not the @font-face definition. The @font definition was CORRECT, but the class .alkaios doesn't have to include the statement src: url(../Fonts/alkaios-regular.ttf); Please, read again my first post; please, read also this page:

http://web.sigil.googlecode.com/git/...bed_fonts.html

And you'll realize that what I said was correct. The issue is not in your @font-face declarations but in the way you are wanting to apply those fonts.

Last edited by RbnJrg; 05-15-2013 at 06:30 PM.
RbnJrg is offline   Reply With Quote
Old 05-15-2013, 04:17 PM   #13
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,910
Karma: 5880479
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by RbnJrg View Post
And you'll realize that what I said was correct. The issue is not in your @font-face declarations but in way you are wanting to apply those fonts.
You are correct, SRC only belongs in the @font.

font-family: alkaios ; is all that should be in any selector where it is used
theducks is online now   Reply With Quote
Old 05-21-2013, 05:33 PM   #14
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 548
Karma: 94420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by theducks View Post
You are correct, SRC only belongs in the @font.

font-family: alkaios ; is all that should be in any selector where it is used
Actually, you're all correct. Sort of. Sigil is also correct using CSS 2.1 for validation, because that's the closest CSS level to what the epub 2 standard requires. (actually I think epub 2 specifies CSS 2.1 explicitly. Correct me if I'm wrong.)

However, even though CSS 2.1 will complain about font declarations, they still work in epub. CSS 3 will correctly validate font declarations, but it will also validate some constructions that are not allowed in epub 2. So if Sigil were to validate against CSS 3 (as one of the recent betas did), a situation could arise where your epub stylesheet validated "correctly", yet reader software choked on it.

This debate has gone round and round in other threads in this forum, and the decision was made to validate against CSS 2.1 as being cannonically correct. So, ignore errors related to font declarations. Or manually check against CSS 3.0 yourself. (easily done: Copy the stylesheet and paste it into a browser window at the W3C CSS validation site.)
st_albert 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 font - now line with embedded font not re-flowing Kaylee Skylyn ePub 23 08-09-2012 07:30 PM
FlightCrew report about embedded font roger64 Sigil 8 04-20-2011 03:00 PM
Can't delete embedded font eosrose Sigil 1 08-16-2010 06:28 AM
problem with embedded font ericshliao EPUBReader 2 12-11-2009 10:04 AM
LRF with embedded font igorsk Sony Reader 8 10-26-2006 08:08 AM


All times are GMT -4. The time now is 04:51 PM.


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