4 ms·
EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?
by oefrha 7y ago
EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?
- qwerty456127 7y agoFonts are among the last things I want it to encapsulate, I'm kind of a content-formatting separation extremist. In fact I often convert epub books to fb2 just to make my PocketBook use the default font for better readability (perhaps there is a switch somewhere but couldn't find it). As for the pictures - I'm comfortable with them being Base64-encoded and encapsulated at the end of the FB2 file. EPUB indeed is more feature reach but from my point of view that is all bloat and unnecessary complexity. I haven't seen a single ebook which could actually benefit from EPUB features. Whatever features rich typesetting worth saving is rarely published this way anyway, they just use PDF (which is sad but true).
- thomascgalvin 7y agoI wrote and use an editor similar to Scrivener that allows the user to edit in Markdown, but saves the project as XML. Images are saved as nodes with a mimetype and a Base64-encoded byte array, and referenced in the document with a UUID. HTML also allows you to specify an image inline using Base64 encoding; soemthing like <img src="data:image/png;base64, fhfhfhfh..."> I don't know what FB2 does, but it's definitely a solvable problem.
- rnhmjoj 7y agoReading the wikipedia article[1] this is exactly what it does. [1]: https://en.wikipedia.org/wiki/FictionBook#Differences_from_other_ebook_formats https://en.wikipedia.org/wiki/FictionBook#Differences_from_o...
- caconym_ 7y agoI feel like there's a time and a place for not including those things. I write stories (~1-100k words) in Markdown and run them through Pandoc to get epubs, and the results are nice enough with a small bit of custom CSS but I would love to outsource formatting entirely to the viewer. I don't want anything fancier than the sort of formatting you'd see in a mass market paperback. I recently bought an ebook and found that it was formatted in a custom font, so I "returned" it immediately. I guess this is a philosophical issue to some extent, but I don't think the typical novel is visual content, and I don't know what you're trying to accomplish by overriding my preferred settings for text presentation.
- brokenkebab 7y agoFB2 supports illustrations (jpg, png). As for CSS, fonts, and other such embeddings - they are anti-features from a reader's perspective. Why instead of adaptable, and user-tunable semantic markup would I prefer some guy's tastes, or some company's corporate style pushed on me? Besides, there's a big surface for bugs in epub. It happened to me to buy an ebook which froze my reader until I weeded out CSS, and fonts from it with Calibre. Ironically, it also, made it easier to read.