01-09-2010, 08:54 PM | #1 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
|
Error with adding font to EPUB news recipe
I tried adding the following code to my Japanese news recipes, but I always get an error with the '@' line.
@font-face { font-family: "Ryo Gothic"; font-weight: normal; font-style: normal; src: url(res:///abook/fonts/ryogothicplusnmedium.ttf); } For a better overview of my problem please read this thread: https://www.mobileread.com/forums/showthread.php?t=67329 If anyone could help me out, I'd appreciate it. |
01-10-2010, 03:00 PM | #2 | |
Connoisseur
Posts: 78
Karma: 192
Join Date: Nov 2009
Device: Sony PRS-600
|
Quote:
|
|
Advert | |
|
01-11-2010, 10:16 AM | #3 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2009
Device: Astak PP
|
My second recipe here is in unindent problem.
This recipe downloads a file but with no changes on my ereader (viewable on my comp tho): #!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2008 - 2009, Darko Miletic <darko.miletic at gmail.com>' ''' engadget.com ''' from calibre.web.feeds.news import BasicNewsRecipe class Engadget(BasicNewsRecipe): title = u'Engadgetreelz' __author__ = 'Darko Miletic' description = 'Tech news' language = 'ja' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = True feeds = [ (u'Posts', u'http://japanese.engadget.com/rss.xml')] extra_css = '\ @font-face {font-family: "Ryo Gothic PlusN M";src:url(res:///abook/fonts/ryogothicplusnmediumfont.ttf)}\n\ .article_description{font-family: Ryo Gothic PlusN M}\n\ p{font-family: Ryo Gothic PlusN M}\n\ h1 {font-weight: normal;}\n\ h2 {font-style: normal;}\n' def postprocess_html(self, soup, f): soup.find('html')['xml:lang'] = 'ja' ['lang'] = 'ja' return soup Calibre won't accept this recipe: #!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2008 - 2009, Darko Miletic <darko.miletic at gmail.com>' ''' engadget.com ''' from calibre.web.feeds.news import BasicNewsRecipe class Engadget(BasicNewsRecipe): title = u'EngadgetreelzFont' __author__ = 'Darko Miletic' description = 'Tech news' oldest_article = 7 language = 'ja' max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = True feeds = [ (u'Posts', u'http://japanese.engadget.com/rss.xml')] @font-face { font-family: "Ryo Gothic"; font-weight: normal; font-style: normal; src: url(res:///abook/fonts/ryogothicplusnmedium.ttf); } |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
xkcd recipe error | sonyreaderuser | Calibre | 3 | 09-18-2010 05:00 PM |
Error Adding Plugin | modkindle | Plugins | 14 | 05-16-2010 12:14 PM |
Help with news recipe | Acey | Calibre | 2 | 03-12-2010 06:36 AM |
Error adding books | Gfinch | Calibre | 2 | 08-03-2008 08:36 PM |
[calibre] recipe - smaller font? | moneytoo | Calibre | 0 | 06-01-2008 08:00 AM |