38465 Commits

Author SHA1 Message Date
Kovid Goyal
4abffead71
macOS: Fix loading of CoreText font database on newer Qt in the headless plugin 2019-06-08 10:31:18 +05:30
Kovid Goyal
d39087a356
py3: more unicode porting 2019-06-07 16:49:14 +05:30
NiLuJe
474d76e645 Fix that comment ;). 2019-06-07 04:12:34 +02:00
Kovid Goyal
216a5c2758
Fixes for some dylib loading issues 2019-06-06 21:11:58 +05:30
Kovid Goyal
379e6c2171
Build qt-macextras 2019-06-06 20:37:38 +05:30
Kovid Goyal
35169e2743
String changes 2019-06-06 09:13:18 +05:30
Kovid Goyal
5e2248fdce
qt -> qt-base 2019-06-06 08:57:08 +05:30
Kovid Goyal
e2190da060
... 2019-06-06 08:56:43 +05:30
Kovid Goyal
9d025de990
Add PyQtWebEngine 2019-06-06 07:24:41 +05:30
Kovid Goyal
109a052102
Merge branch 'master' of https://github.com/lifanxi/calibre 2019-06-05 21:30:55 +05:30
Li Fanxi
d1a6113a8a Support subtitle in Douban metadata plugin 2019-06-05 23:25:08 +08:00
Kovid Goyal
dedbc1ddb3
Split up Qt into modules
Add extra deps for webengine
2019-06-05 17:55:35 +05:30
Kovid Goyal
3f903cbdd1
CHM Input: Fix a regression that broke processing of some CHM files
Fixes #1831511 [Can't open chm file](https://bugs.launchpad.net/calibre/+bug/1831511)

Bug was introduced due to adding of unicode_literals.
Also fix CHM input on python3
2019-06-05 09:08:17 +05:30
Kovid Goyal
a7fd7a0aee
DRYer 2019-06-05 08:17:03 +05:30
Kovid Goyal
0f03044db4
More work on the macOS build 2019-06-04 17:01:20 +05:30
Kovid Goyal
2a10ae9789
Bump version of ICU
Needed because of this:
https://unicode-org.atlassian.net/browse/ICU-20526
which caused broken ICU builds on macOS
2019-06-04 16:25:53 +05:30
Kovid Goyal
f2f57d2dda
Work on new calibre macOS build 2019-06-04 16:22:50 +05:30
Kovid Goyal
fc972b6157
Better error message when loading ICU data fails 2019-06-04 16:22:07 +05:30
Kovid Goyal
cb524b7cc1
Port the macOS headless plugin to work with Qt 5.12 2019-06-04 16:03:08 +05:30
Kovid Goyal
13eb6795e6
Edit book: When auto-closing tags on typing </ fix occasionally incorrect tag being closed in large files because syntax highlighting has not competed 2019-06-03 20:49:34 +05:30
NiLuJe
43d53f8dbe Simplify that
I was *probably* trying to mimic a C ternary operator ;p
2019-06-03 15:59:38 +02:00
NiLuJe
a79f9b9b54 Kill letterboxing in KOBO
It makes no sense without an "honor AR" option ;).
2019-06-03 15:51:31 +02:00
NiLuJe
5883667ebe Forgot the KOBO letterbox checkbox in the settings
Which made me realize that there's no "keep AR" function there,
so this doesn't make sense \o/.
2019-06-03 15:46:28 +02:00
NiLuJe
cff3c4ad68 Tweak the PNG help message a bit
Given that Nickel has handled PNGs as books as early as 2.9.0, if not
earlier, I can't see this actually being an issue anywhere in practice,
but, better be safe than sorry ;).
2019-06-03 14:29:17 +02:00
NiLuJe
62e2925e4b Address some more review comments
No need to handle old settings migration for those new settings in KOBOTOUCH
2019-06-03 14:26:19 +02:00
NiLuJe
d0cf06a5e5 Continue addressing review comments
Less destructive to the legacy KOBO driver (only honor letterboxing,
and only do it to full-screen covers like KOBOTOUCH).

Also, unbreak legacy settings by not re-ordering them.
2019-06-03 14:22:20 +02:00
NiLuJe
7c02419eed Start addressing review comments
Explicit cast to float is superfluous, thanks to __future__.division
2019-06-03 14:09:49 +02:00
Kovid Goyal
cff789f12c
Modernize the code used to interact with macOS
Recycle bin and notifications code. The old recycle bin code was
deprecated. Notifications support has been moved in-process.
2019-06-03 13:37:51 +05:30
NiLuJe
04c7a8aa4a Make the GCC 4.8 bot happy ;). 2019-06-02 20:44:00 +02:00
NiLuJe
aaa2fa936a Use a lower compression level for the first PNG pass
optipng will fix it anyway
2019-06-02 18:29:50 +02:00
NiLuJe
cc8a3b4450 Refactor that to avoid code duplication 2019-06-02 18:29:50 +02:00
NiLuJe
8e7b519b8d Inline the grayscaling pass in ordered_dither
Saving one QImage pixel-loop dance in the process...
2019-06-02 18:29:50 +02:00
NiLuJe
4326bb9d7f Unify indentation style 2019-06-02 18:29:50 +02:00
NiLuJe
c465d7f4e7 Tweak copyright header a bit, now that it's done 2019-06-02 18:29:50 +02:00
NiLuJe
227b5f97bd Stick the commented out Indexed8 code in there, for posterity's sake (in
preparation of a squash)
2019-06-02 18:29:50 +02:00
NiLuJe
d2772a2916 Eh, okay-ish optipng compromise 2019-06-02 18:29:50 +02:00
NiLuJe
bdb767c9b7 Forget about optipng
Granted, it helps, but it's prohibitively expensive.
2019-06-02 18:29:50 +02:00
NiLuJe
d6efb350bf Experiment w/ optipng... 2019-06-02 18:29:50 +02:00
NiLuJe
b5554bd0da Revert "See what happens if we switch to Indexed8..."
This reverts commit a602b8b872c5b4c4c0772b82bb43e2384d92fd63.

What happens is we end up with an alpha channel in our PNGs, which
screws with our first entry in the palette: black, which is no longer at
full opacity :/.
2019-06-02 18:29:50 +02:00
NiLuJe
38ad6a5b2d See what happens if we switch to Indexed8... 2019-06-02 18:29:50 +02:00
NiLuJe
96a98bbc29 Fix syntax error 2019-06-02 18:29:50 +02:00
NiLuJe
4f754d518a I should probably have tried to build that first xD 2019-06-02 18:29:50 +02:00
NiLuJe
81b303aa18 Tweak help messages a bit 2019-06-02 18:29:50 +02:00
NiLuJe
5e7907b0aa Ups, actually Grayscale8, as I'm not writing a palette...
Let's see what QImageWriter makes of that before checking if I really
need to bother with Indexed8...
2019-06-02 18:29:50 +02:00
NiLuJe
90ab7573d9 Return an Indexed8 QImage
Ensures it'll be encoded as such when saved as a PNG
2019-06-02 18:29:50 +02:00
NiLuJe
7e6347486b Port ImageMagick's OrderedDither algorithm, and use that instead of
ImageOps' quantize to dither images to the eInk palette.

It works much better for our intended purpose, and it's pretty fast.
2019-06-02 18:29:49 +02:00
NiLuJe
cf1b855ea0 Rejig thumbnail dimension calculations
Instead of bounding the the requested values, we *expand* around those,
like downloaded thumbnails for store-bought KePubs.

Also handle wonky landscape source ARs properly while we're there.
2019-06-02 18:29:49 +02:00
NiLuJe
1f0bc97a15 Update thumbnail dimensions, based on @geek1011's findings
c.f., https://github.com/shermp/Kobo-UNCaGED/issues/16#issuecomment-494229994
2019-06-02 18:29:49 +02:00
NiLuJe
832ab64c63 Greater control over Kobo covers processing.
* Optional dithering down to the exact eInk color palette.
  Note that, on some devices, FW >= 4.11 will do a much better job of it
  than us.
  That's true on the H2O, for instance, but not on the Forma, where it
  only does so on thumbnails, not on the sleep cover...
  When it does, grayscaling is done in sRGB space, and not linear light,
  like we do, but that's a much more minor issue, and one where no-one
  is actually wrong ;).
  Depends on B&W covers to avoid nonsensical results.
* Optional letterboxing of full-screen covers to avoid extra Nickel
  processing.
  Depends on Keep AR to avoid nonsensical results.
* Optional storage as PNG to avoid JPG wrecking the dithering
  Depends on B&W covers to avoid storing stupidly large color PNGs.
* Fix rounding errors when calculating thumbnail sizes:
  AR should be a float, and we want to honor the *height* expected by
  Nickel when there's potential for rounding mistakes (which is pretty
  much always for thumbnails, given that the perfect AR should be 0.75).
  Meaning we'll want to round properly before truncating ;).
* Fix thumbnail sizes on the Forma. Apparently, quite a few bits of the
  FW behave as if the screen was Aura One sized...
  Try to do it right on our end instead of following suit ;).
  Unfortunately, full-screen cover processing is slightly broken on
  nickel's side right now:
  it appears to be treating them as Aura One sized, which incurs an
  ugly and unavoidable scaling pass, one way or the other...

c.f., http://www.mobileread.com/forums/showpost.php?p=3025725&postcount=225
  and the few pages around it.
2019-06-02 18:29:49 +02:00
Kovid Goyal
b5230d9bd8
py3: more unicode porting 2019-06-02 14:33:27 +05:30