Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2017, 06:44 AM   #1
Sebastian Kane
Junior Member
Sebastian Kane began at the beginning.
 
Sebastian Kane's Avatar
 
Posts: 1
Karma: 10
Join Date: Jul 2017
Device: Nexus7, Nokia
CSS rules

First of all, a big thank you for the development of Calibre. It is a tremedous tool. If I were not starving right now, I'd send you money. I have been playing with it for only alittle while, and am still discovering functionalty, so please forgive me if my questions are 'newby-ish'.

But secondly, some questions about the way Calibre handles CSS.
  1. When specifying fonts to embed in a conversion, like MOBI to EPUB, the @font-face decalaration in the converted book inlcudes a panose specification which I'm pretty sure is deprecated. Why?
  2. When specifying fonts to embed in a conversion (MOBI to EPUB), the @font-face declaration always points to the wrong location for the font files, and I have to adjust the parenthetical address. Why?
  3. When specifying a @viewport or @-ms-viewport declaration, the Calibre Tools>Check Book function regards these as errors. Why?
  4. The Search replace function is great, except there's no way to accurately structure a multiple line replacement string vecause I cannot see/access charaters like line breaks and & nbsp ;, and soem other characters. So I have to switch to a text editor for that. But when I paste mutliple line strings into the replace reticule they work - they just don't display the operators. Why?

Keep up the good work!
Sebastian Kane is offline   Reply With Quote
Old 07-19-2017, 07:25 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont specify fonts to embed via @font-face rules. You simply specify the font-families and use the embed all fonts setting. And you want to match on new lines/other invisible characters in regex use the escaped form for the characters. There are many different escaped forms you can use (calibre uses the python regex engine). For example to match newlines, use

\n

@viewport is not a valid CSS 2.1 or 3 rule.
kovidgoyal is offline   Reply With Quote
Advert
Reply

Tags
css, search & replace, viewport


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inconsistencies in Remove unused CSS rules!? chaot Editor 8 04-28-2016 12:38 PM
Remove unused CSS Rules Divingduck Editor 2 06-21-2014 07:51 AM
In an ePub reader, what are the rules for processing styles/CSS? mattcurtis ePub 1 04-05-2013 11:11 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
Conditional CSS rules Jellby ePub 10 01-20-2009 08:32 AM


All times are GMT -4. The time now is 02:54 PM.


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