| 
			
			 | 
		#1 | 
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 314 
				Karma: 1002965 
				Join Date: Mar 2006 
				Location: UK 
				
				
				Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2 
				
				
				 | 
	
	
	
		
		
			
			 
				
				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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 A Hairy Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,397 
				Karma: 20212733 
				Join Date: Dec 2012 
				Location: Charleston, SC today 
				
				
				Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 314 
				Karma: 1002965 
				Join Date: Mar 2006 
				Location: UK 
				
				
				Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 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!  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			This was copied from a working @font 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Code: 
	src:url(../Fonts/CharisSILR.ttf)  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 314 
				Karma: 1002965 
				Join Date: Mar 2006 
				Location: UK 
				
				
				Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 @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.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			My working embedded font code has no quotes of any kind in the source line.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Also, the CSS code you last posted is correct. It's the validation that's getting it wrong.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,877 
				Karma: 8821117 
				Join Date: Mar 2013 
				Location: Rosario - Santa Fe - Argentina 
				
				
				Device: Kindle 4 NT 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 .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).  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	@font-face {
font-family: alkaios;
font-style: normal;
font-weight: normal;
src: url(../Fonts/alkaios-regular.ttf);
}
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 Addict 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 314 
				Karma: 1002965 
				Join Date: Mar 2006 
				Location: UK 
				
				
				Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Thank you J.S. Wolf. I didn't know what version of CSS validation Sigil used.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,877 
				Karma: 8821117 
				Join Date: Mar 2013 
				Location: Rosario - Santa Fe - Argentina 
				
				
				Device: Kindle 4 NT 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 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 07:30 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
    You are correct,  SRC only belongs in the @font.font-family: alkaios ; is all that should be in any selector where it is used  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | |
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 698 
				Karma: 150000 
				Join Date: Feb 2010 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 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.)  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			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 08:30 PM | 
| FlightCrew report about embedded font | roger64 | Sigil | 8 | 04-20-2011 04:00 PM | 
| Can't delete embedded font | eosrose | Sigil | 1 | 08-16-2010 07:28 AM | 
| problem with embedded font | ericshliao | EPUBReader | 2 | 12-11-2009 11:04 AM | 
| LRF with embedded font | igorsk | Sony Reader | 8 | 10-26-2006 09:08 AM |