Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2019, 02:49 PM   #1
PenguinCEO
Member Retired
PenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipedia
 
Posts: 61
Karma: 47166
Join Date: Sep 2018
Device: a lot
故事主要描述當伐木

故事主要描述當伐木

Last edited by PenguinCEO; 04-16-2020 at 11:08 PM.
PenguinCEO is offline   Reply With Quote
Old 12-19-2019, 03:28 PM   #2
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 194
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
I have an ebook...
This is a spectacular piece of over-engineering for a humble e-book. It would be very difficult to tell if this is a bug in Calibre without reducing the number of moving parts in this code.
Brett Merkey is offline   Reply With Quote
Advert
Old 12-19-2019, 03:48 PM   #3
PenguinCEO
Member Retired
PenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipedia
 
Posts: 61
Karma: 47166
Join Date: Sep 2018
Device: a lot
故事主要描述當伐木

Last edited by PenguinCEO; 04-17-2020 at 02:41 AM.
PenguinCEO is offline   Reply With Quote
Old 12-19-2019, 04:50 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,580
Karma: 146059340
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
One question that comes to mind is what variant of epub are you creating? 2 or 3?
DNSB is online now   Reply With Quote
Old 12-19-2019, 09:15 PM   #5
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,996
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre has no support for CSS variables and that is not likely to change anytime soon.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-20-2019, 08:37 AM   #6
PenguinCEO
Member Retired
PenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipedia
 
Posts: 61
Karma: 47166
Join Date: Sep 2018
Device: a lot
故事主要描述當伐木

Last edited by PenguinCEO; 04-17-2020 at 02:41 AM.
PenguinCEO is offline   Reply With Quote
Old 12-20-2019, 08:39 AM   #7
PenguinCEO
Member Retired
PenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipedia
 
Posts: 61
Karma: 47166
Join Date: Sep 2018
Device: a lot
故事主要描述當伐木

Last edited by PenguinCEO; 04-17-2020 at 02:41 AM.
PenguinCEO is offline   Reply With Quote
Old 12-20-2019, 09:21 AM   #8
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 194
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
...did you not believe in the stability of the CSS standard?
No lack of CSS religion here. It is important to keep in mind that Calibre is not primarily an editing tool. Even so, for those comfortable with code view and with regex, Calibre (with add-ons) serves as a more than adequate editing tool, supporting far more HTML/CSS standards than most e-reader devices are capable of.

Quote:
some problem with CSS support from the various ereaders?
The code example you offered is way beyond anything implemented in most devices. Many devices don't even support basic pseudo classes or pseudo elements or can handle floats or simple dropcaps or columns or call-outs. Perhaps you can mention the device you are coding this non-humble e-book for?

Even the Kindle Paperwhite, a fairly nice device, has problems with basic typography. For instance, CSS font-size keywords are blown up for any user who has the device set to non-default font-size increments. I have to use a custom regex-function (a cool Calibre feature) on the stylesheet to eliminate/modify all font-size keywords.

Last edited by Brett Merkey; 12-20-2019 at 09:46 AM.
Brett Merkey is offline   Reply With Quote
Old 12-20-2019, 10:15 AM   #9
PenguinCEO
Member Retired
PenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipediaPenguinCEO knows more than wikipedia
 
Posts: 61
Karma: 47166
Join Date: Sep 2018
Device: a lot
故事主要描述當伐木

Last edited by PenguinCEO; 04-17-2020 at 08:38 AM.
PenguinCEO is offline   Reply With Quote
Old 12-20-2019, 10:52 AM   #10
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,996
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by PenguinCEO View Post
Is it a feature of the project or did you not believe in the stability of the CSS standard? Or maybe there is some problem with CSS support from the various ereaders?
I have no interest in implementing it. If you do, patches are welcome.
kovidgoyal is offline   Reply With Quote
Old 12-20-2019, 10:54 AM   #11
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 194
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
inaugurate a section in the MobileRead wiki that lists the HTML / CSS features supported by ALL devices, so that a publisher has a knowledge base to build really "standard" ebooks, which can be read by any device.
A logical suggestion. Unfortunately, having on hand someone with the energy and stature of Eric Meyer to handle that is really too much to hope for.
Brett Merkey is offline   Reply With Quote
Old 12-20-2019, 10:57 AM   #12
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,952
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
100% guaranteed EPUB is a SUBSET of the possible CSS.

~90% of those EPUB devices, DO NOT support all the allowed EPUB CSS, or in their effort to allow user control, have mucked up what the author CAN do with them.

eg a simple 50% width HR is supposed to auto center. HA! you want it in the center, you better push it there with a margin-left: 50%

Read the MR Wiki sections on formats, there are dozens of issues (and some work-arounds like that above)
theducks is online now   Reply With Quote
Old 12-20-2019, 11:53 AM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,580
Karma: 146059340
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by PenguinCEO View Post
Maybe you're right, but this means that no device can handle the entire CSS standard. And therefore there is no possibility to really define a standard for ePub. Perhaps it would be appropriate to inaugurate a section in the MobileRead wiki that lists the HTML / CSS features supported by ALL devices, so that a publisher has a knowledge base to build really "standard" ebooks, which can be read by any device.
Good luck with that project. Given the way that the renderer creators tend to cherry pick the features they want to support and the wildly varying level of support for the various flavours of EPUB (EPUB2, EPUB3, EPUB3 FLO, etc.) along with some renderers that disregard most CSS in the epub, you will find that an epub ebook that can be read by any device and display the way the publisher wished is going to use a very simple layout.

I had hoped with the Readium project supplying the base code for most of the EPUB3 renderers that this Tower of Babel would be eliminated but so far, that does not seem to be happening.

I won't even get into the fun of attempting to support Amazon's mobi and KF8 formats with the same CSS though you do get used to multiple pages of media queries.

Edit: Out of curiosity, what happens if you embed your CSS stylesheets in the ebook and link them to the xhtml files rather than using the @import?
DNSB is online now   Reply With Quote
Old 12-20-2019, 12:09 PM   #14
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 194
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
...multiple pages of media queries...
Interesting. I find that Calibre silently deletes media queries in my ePub to AZW3 conversions. How do you get around that? Perhaps you can post sometime with your experiences by starting another conversation. In particular, I would like to insert a media query into the ePub so that a resulting AZW3 conversion will have negative margins on html or body. Calibre wipes them without apology. :-)

Last edited by Brett Merkey; 12-20-2019 at 12:11 PM.
Brett Merkey is offline   Reply With Quote
Old 12-20-2019, 12:12 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,561
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
This is your CSS without all the rubbish that will work to subset the fonts. Also, you do not need two CSS. In fact, it's just really poor coding (IMHO) to use multiple CSS.

The modification I've made to your CSS makes your CSS much more compact and simple. Plus, it will wor in Calibre to subset your fonts. WHat you were doing before was not going to work in most programs/Readers. However you were coding your CSS, just don't do it because it's not going to work.

Code:
@font-face {
  src: url(F01.ttf);
  font-family: "Fiandra";
  font-weight: bold;
  font-style: normal;
}
@font-face {
  src: url(F02.ttf);
  font-family: "Waterly 10";
  font-weight: bold;
  font-style: italic;
}
div.question {
  font-family: "Fiandra";
  font-size: 90.5%;
}
div.answer {
  font-family: "Waterly 10";
}
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Calibre font subsetting GrannyGrump Calibre 2 12-23-2014 12:07 AM
Problem with font subsetting grumbles Editor 17 06-20-2014 02:35 PM
Font subsetting problem yktan Calibre 5 09-19-2013 11:00 PM
Bug in font subsetting JSWolf Calibre 9 01-17-2013 09:46 AM
ePub Font Subsetting Cygfrydd ePub 2 08-17-2010 08:53 AM


All times are GMT -4. The time now is 11:28 AM.


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