|  03-29-2014, 12:44 PM | #571 | 
| Grand Sorcerer            Posts: 6,267 Karma: 16544702 Join Date: Sep 2009 Location: UK Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3 | 
			
			But, which epub devices would you be targetting? Sony PRS505 through to PRS650 family already have this feature in the PRSPlus custom software. PRST1 has it in Morkl's custom EbookReader app. All Kobos allow customised on-device font as a standard feature for main book text plus there's an option in the standard calibre Kobo driver which can be used to fine-tune 'special' fonts (e.g. smallcaps, dropcaps, monospace etc). Although I have to confess I'm not sure what Nooks can do with custom on-device fonts. Modify Epub already has an option to Append extra CSS. Last edited by jackie_w; 03-29-2014 at 12:48 PM. | 
|   |   | 
|  03-29-2014, 12:48 PM | #572 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
  I kind of like this idea, but isn't it device dependent? I believe my device uses something like Code: src: url("res:///fonts/TestFonts.ttf")1)Modify to use any Device fonts, removing those embedded fonts from the book. 2)Remove all Embedded fonts but use any device resident font, (assumes CSS has a fallback coded). 3)Removal all @fonts and embedded fonts | |
|   |   | 
|  03-29-2014, 02:09 PM | #573 | ||
| Guru            Posts: 657 Karma: 64171 Join Date: Sep 2010 Location: Kent, England, Sol 3, ZZ9 plural Z Alpha Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin) | Quote: 
 Quote: 
 Code: res:///fonts/ As has been pointed out for more wider usage would have to be in output/driver PI. | ||
|   |   | 
|  03-29-2014, 08:42 PM | #574 | 
| Wizard            Posts: 1,760 Karma: 9918418 Join Date: Feb 2013 Location: Here on the perimeter, there are no stars Device: Kobo H2O, iPad mini 3, Kindle Touch | 
			
			Here's a feature I'd like: a Kobo-DRM equivalent to the "remove ADEPT tags" feature. The liberated Kobo books have a JavaScript file that gets included in the pages, a couple of lines of CSS that are likewise pasted in, and a ton of SPAN tags that no longer serve any purpose besides cluttering up the code. Like the ADEPT case, the DRM's already been removed; this is simply about cleaning up the mess it left behind. Similarly, an option to remove SPAN tags with no attributes, and to merge adjacent SPAN tags with the same attributes, would also be nifty. Phoenix Pick is horrible about that last one. Merging adjacent or empty bold/italic tags would also be useful; cases like </i><i>, <i/>, and <b></b> should always be removed. | 
|   |   | 
|  03-29-2014, 11:03 PM | #575 | 
| Grand Sorcerer            Posts: 13,693 Karma: 79983758 Join Date: Nov 2007 Location: Toronto Device: Libra H2O, Libra Colour | 
			
			Um... The spans and java script are an integral part off the bookmark support in the kepub reading engine
		 | 
|   |   | 
|  03-29-2014, 11:12 PM | #576 | 
| Wizard            Posts: 1,760 Karma: 9918418 Join Date: Feb 2013 Location: Here on the perimeter, there are no stars Device: Kobo H2O, iPad mini 3, Kindle Touch | |
|   |   | 
|  03-29-2014, 11:17 PM | #577 | 
| Grand Sorcerer            Posts: 13,693 Karma: 79983758 Join Date: Nov 2007 Location: Toronto Device: Libra H2O, Libra Colour | 
			
			So why not ask for a plugin to convert from kepub to epub as that IS what you want.
		 | 
|   |   | 
|  03-30-2014, 12:08 AM | #578 | 
| Wizard            Posts: 1,760 Karma: 9918418 Join Date: Feb 2013 Location: Here on the perimeter, there are no stars Device: Kobo H2O, iPad mini 3, Kindle Touch | |
|   |   | 
|  03-30-2014, 01:45 AM | #579 | 
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | 
			
			I can see stripping the javascript and CSS as part of Modify ePub. Removing the spans should be done as an input plugin for the conversion. Then it is used during a conversion from kepub to any other format.
		 | 
|   |   | 
|  04-02-2014, 12:49 AM | #580 | |
| Grand Sorcerer            Posts: 13,693 Karma: 79983758 Join Date: Nov 2007 Location: Toronto Device: Libra H2O, Libra Colour | Quote: 
 The challenge is that while it is trivial to handle a non nested span (something along the lines of Code: <span.+?id="kobo[\d.]+.*?>(.*?)<\/span> The testing book with nested span's I was using contained the following markup Code: <p class="indent"> <span id="kobo.114.1">I don’t go in for ‘lawn maintenance’, though — all that weeding and feeding.</span> <span id="kobo.114.2"> I prefer my ‘weeds’: the clover, which keeps the grass naturally green with its nitrogen-fixing nodules; the daisy, opening and closing each day (its name comes from the Old English <em>daeges <span class="ent1">ē</span>age</em>, meaning ‘the day’s eye’); the little blue-purple <em>Prunella</em>, known as ‘self-heal’, used to treat sore throats, mouth <a id="page_184"></a>ulcers and open wounds — and still used in modern herbal medicine as an astringent for external or internal wounds.</span> <span id="kobo.114.3"> As Vita Sackville-West said, ‘A weed is only a plant in the wrong place.’ To which we should add: ‘or one for which we haven’t yet discovered the use’.</span> </p> | |
|   |   | 
|  04-02-2014, 02:26 AM | #581 | |
| Wizard            Posts: 1,760 Karma: 9918418 Join Date: Feb 2013 Location: Here on the perimeter, there are no stars Device: Kobo H2O, iPad mini 3, Kindle Touch | Quote: 
 | |
|   |   | 
|  04-02-2014, 03:02 AM | #582 | |
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | Quote: 
 And yes, using an XSLT transformation would probably make this easy. It could probably be done with BeautifulSoup without to much problems. But, again, I think this belongs as a calibre conversion plugin and it would need to look at what it uses for this. | |
|   |   | 
|  04-02-2014, 12:58 PM | #583 | |
| Ex-Helpdesk Junkie            Posts: 19,421 Karma: 85400180 Join Date: Nov 2012 Location: The Beaten Path, USA, Roundworld, This Side of Infinity Device: Kindle Touch fw5.3.7 (Wifi only) | Quote: 
 | |
|   |   | 
|  04-02-2014, 01:52 PM | #584 | 
| Grand Sorcerer            Posts: 13,693 Karma: 79983758 Join Date: Nov 2007 Location: Toronto Device: Libra H2O, Libra Colour | |
|   |   | 
|  04-02-2014, 02:29 PM | #585 | |
| Ex-Helpdesk Junkie            Posts: 19,421 Karma: 85400180 Join Date: Nov 2012 Location: The Beaten Path, USA, Roundworld, This Side of Infinity Device: Kindle Touch fw5.3.7 (Wifi only) | Quote: 
 Code: <span[^<>]*>([^<>]*)</span> So we'd have to use negative lookahead, as such: Code: (?:(?!<(?:span|/span)>).)* Final regex: Code: <span[^<>]*>((?:(?!<(?:span|/span)>).)*)</span> Code: <(span|/span) Final regex: Code: <span[^<>]*>((?:(?!<(?:span|/span)).)*)</span> Last edited by eschwartz; 04-02-2014 at 02:40 PM. | |
|   |   | 
|  | 
| Tags | 
| modify epub | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| [GUI Plugin] Quality Check | kiwidude | Plugins | 1277 | 10-21-2025 10:04 AM | 
| [GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM | 
| [GUI Plugin] Manage Series | kiwidude | Plugins | 167 | 07-28-2024 03:07 PM | 
| Modify ePub plugin dev thread | kiwidude | Development | 346 | 09-02-2013 05:14 PM | 
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |