05-04-2012, 10:44 AM | #241 | |
Calibre Plugins Developer
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Code:
@font\-face[^}]+?} Code:
@font\-face[^}]+?}\s+ |
|
05-04-2012, 10:55 AM | #242 | |
Well trained by Cats
Posts: 29,792
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Instead of removal: simply comment the line out , leaving the value in place for a quick repair |
|
05-04-2012, 11:47 AM | #243 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
What could possibly go wrong? Another opinion re: line-height... I only zap some occurrences (manually, of course), those which affect main body text. I've had problems with long chapter headings if the font is large and the line-height isn't set to 1.3 or higher. Also in agreement about Dropcaps. If the setting isn't 'just right' for your chosen font, it can look terrible. Difficult to achieve a 'perfect' result automatically, I think. I don't suppose most people are this obsessive, though. |
|
05-04-2012, 12:25 PM | #244 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You want \s* not \s+
|
05-04-2012, 12:40 PM | #245 |
Calibre Plugins Developer
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Thx Kovid, good spot.
Re the line-height/dropcaps thing. I've not got a lot of love for dropcaps . Probably because I don't believe my Kindle supports them, and I also don't think that webkit/Sigil or whatever renders them "properly" either. So I personally have no issue of obliterating the "drop" by removing the line height and turning it into a large first letter. I can appreciate however if you wanted to keep them then fair enough you would not want to run this option. What I had more in mind was some of those really nasty pdf scans into rtf which have hundreds of styles (and certainly nothing as fancy as drop-caps!). Maybe this is the wrong solution for that and I should just stick to Sigil regexes. |
05-04-2012, 01:12 PM | #246 | |
Well trained by Cats
Posts: 29,792
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
A user configurable count threshold before removal/disabling |
|
05-04-2012, 02:59 PM | #247 | |
Resident Curmudgeon
Posts: 73,943
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
05-04-2012, 03:01 PM | #248 |
Resident Curmudgeon
Posts: 73,943
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I was going to say something similar but you beat me to it. I have to agree that removing all line height can possibly cause some problems.
|
05-04-2012, 03:04 PM | #249 | |
Resident Curmudgeon
Posts: 73,943
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
05-04-2012, 03:59 PM | #250 | |
Calibre Plugins Developer
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
I've dropped the idea as I said above. In an ideal world it would really be a Sigil plugin if it supported such things, that way you could more easily have the fine control if you wanted it. |
|
05-04-2012, 04:38 PM | #251 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Anyway, we'll never agree on this, let's just leave it |
|
05-04-2012, 04:52 PM | #252 |
Resident Curmudgeon
Posts: 73,943
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But in this case, they are grey stripes. Personally, I do prefer seeing the cover image look the way it's meant to look. I find that if I notice that the aspect ratio is wrong, it ruins the look of the cover for me. It is akin to stretching a 4:3 TV picture to fit a 16:9 screen.
|
05-04-2012, 10:47 PM | #253 | |
Well trained by Cats
Posts: 29,792
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Bleah You might as well watch that movie on a phone Pan and scan is not much better. P&S absolutely ruined the keys scene in ET |
|
05-15-2012, 12:20 PM | #254 |
Calibre Plugins Developer
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Kovid - I've spent a number of hours looking into the conversion pipeline in relation to covers... and my head hurts
In particular - the epub_input.py plugin does some "fiddling" to generate a calibre_raster_cover.jpg and associated entries in the manifest along with a "titlepage" entry in the guide. However by the time it gets to the "structure" part of the pipeline, that seems to have magically disappeared and other logic from somewhere has come into play. Whats that all about - I "assume" it isn't just legacy code and actually has a scenario where it makes sense? Perhaps for non epub output or something? I've found CoverManager being invoked by the epub_output.py plugin at the end, but I'm trying to figure out "what else" is taking place of relevance to covers in between during a conversion. Any other hints you can offer to look at? |
05-15-2012, 01:19 PM | #255 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm afraid I dont keep the details of cover handling in my head. I'd have to trawl through the code myself. IIRC the idea is that epub input creates a raster cover and a reference to the html cover (removing it from the spine), if the html cover is defined in the metadata. The rest of the conversion pipeline does nothing with covers, the various output plugins either use the raster cover, or for epub output do something complicated like replacing the html cover or adding one depending on the cover situation in the input document.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any web-to-epub plugin for internet browser? | bthoven | ePub | 7 | 07-10-2011 05:14 AM |
[Old Thread] Reading epub on viewer inexplicably changes the time stamp of epub | greenapple | Library Management | 20 | 03-19-2011 10:18 PM |
Easy way to modify thread subscription emails in bulk? | snipenekkid | Feedback | 11 | 02-06-2011 03:47 AM |
Another plugin dev question | DiapDealer | Plugins | 2 | 12-11-2010 01:46 PM |
Epub plugin dev | DiapDealer | Plugins | 15 | 11-12-2010 09:36 AM |