Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-25-2018, 01:12 AM   #1
Pepper Breath
Junior Member
Pepper Breath began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Paperwhite 2
Drop cap issue converting ePub > AZW3

I have pictures because I wouldn't know how to properly describe this.

Basically I have the first 2-3 Harry Potter books straight from Amazon using AZW3. The drop cap at the beginning of the chapters looks perfectly fine. The rest of the series I got in epub format and converted via Calibre to AZW3. The drop cap isn't big enough and doesn't look right. Everything else seems to be fine in the conversions.

I generally use the default options during conversions. Basically, default settings minus unchecking "Remove fake margins" in Structure detection and a check on "Do not add Table of Contents to book" in AZW3 output.

I did try checking "Disable font size rescaling" in Look & Feel as well as selecting "Default Output Profile" in Page setup. Usually I have Paperwhite selected as the output profile.

Any ideas?
Attached Thumbnails
Click image for larger version

Name:	good.jpg
Views:	457
Size:	1.03 MB
ID:	161798   Click image for larger version

Name:	Bad.jpg
Views:	398
Size:	1.02 MB
ID:	161799  
Pepper Breath is offline   Reply With Quote
Old 01-25-2018, 01:35 AM   #2
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,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Drop caps are not any well defined thing in ebooks. They are implemented using various hacks, and whether they convert well or not depends on many factors. Your best bet is to edit the book after conversion and manually adjust the css used for the dropcaps to get it to look like you want.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-25-2018, 01:24 PM   #3
Pepper Breath
Junior Member
Pepper Breath began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Paperwhite 2
I looked at the CSS and yes, altering the values for a class called "drop" allows me to get the look I'd like. I edited one of the non-affected AZW3 files and saw that the values were different. Is there any way to prevent Calibre from touching those values?
Pepper Breath is offline   Reply With Quote
Old 01-25-2018, 02:31 PM   #4
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by Pepper Breath View Post
...Is there any way to prevent Calibre from touching those values?
Are the values in the ePub and the calibre converted AZW3 the same, or did calibre actually change them during conversion?

It may be that the publisher chose to spec the drop cap values differently in the ePub, values that may work well in most ePub readers but not the same as what they chose for the AZW3
dwig is offline   Reply With Quote
Old 01-25-2018, 02:36 PM   #5
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: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Take the drop cap code from one of the KF8 versions and copy it to the KF8 conversion and replace the CSS code. That should do it.
JSWolf is offline   Reply With Quote
Advert
Old 01-25-2018, 03:09 PM   #6
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,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Note: This also depends on the Dropcaps font (metrics). Each font may need TLC

I also use padding-right rather than margins to space away from characters next to the DC
theducks is offline   Reply With Quote
Old 01-26-2018, 12:48 AM   #7
Pepper Breath
Junior Member
Pepper Breath began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Paperwhite 2
Quote:
Originally Posted by dwig View Post
Are the values in the ePub and the calibre converted AZW3 the same, or did calibre actually change them during conversion?

It may be that the publisher chose to spec the drop cap values differently in the ePub, values that may work well in most ePub readers but not the same as what they chose for the AZW3
Looks like the values are the same but the format is different for some reason. Original AZW3 and EPUB have the same format but the converted AZW3 is a bit different.

I did edit the converted AZW3 and I can get it to look pretty close to the original, so that's an option, though I am baffled why I have to do this when the original values in the original files look just fine.

AZW3 from Amazon:
Code:
.drop{float:left;font-size:3.4em;margin-right:0.05em;font-weight:bold;line-height:.7em;margin-top:.1em;}
EPUB from different store:
Code:
.drop{float:left;font-size:340%;margin-right:0.05em;font-weight:bold;line-height:.7em;margin-top:.1em;}
AZW3 after conversion:
Code:
.drop {
    float: left;
    font-size: 340%;
    font-weight: bold;
    line-height: 0.7em;
    margin-right: 0.05em;
    margin-top: 0.1em
    }
Pepper Breath is offline   Reply With Quote
Old 01-26-2018, 04:45 AM   #8
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: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Change the font size from 340% to 3.4em.
JSWolf is offline   Reply With Quote
Old 01-26-2018, 09:06 AM   #9
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
A question, why is calibre changing measurement from 3.4em to 340% for the font-size. From the sample above I can't see why this is needed.
Are there more than one definition with different measurements for Dropcaps?
Divingduck is offline   Reply With Quote
Old 01-26-2018, 10:39 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,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
340% and 3.4 em are the same thing, they both mean 3.4 times the parent elements font size.
kovidgoyal is offline   Reply With Quote
Old 01-26-2018, 01:45 PM   #11
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Yea, but why the change to %, is there a inside why this happen? I understood if there is a need for incompatible measurements between formats or multiple mixed measurements streamline to one measurement like you do it for the final live CSS view in the editor.

(It's only for understanding what happen)
Divingduck is offline   Reply With Quote
Old 01-26-2018, 11:48 PM   #12
Pepper Breath
Junior Member
Pepper Breath began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Paperwhite 2
Quote:
Originally Posted by JSWolf View Post
Change the font size from 340% to 3.4em.
Tried this. No change unfortunately.

Some additional troubleshooting steps I took:

Reset all options to Default using the button below for AZW3 conversions: no change

Tried converting to MOBI (both old and new): no change

Disabled and re-enabled font size changing: no change

Tried replacing the "neat" format of the calibri .drop element with the single line from the original AZW3 and EPUBs: no change


I have no idea why it's doing this. If possible, it's annoying me much more now than when I first asked. lol I really regret not just getting the whole series from Amazon now.
Pepper Breath is offline   Reply With Quote
Old 01-27-2018, 08:43 AM   #13
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by Pepper Breath View Post
I have no idea why it's doing this. If possible, it's annoying me much more now than when I first asked. lol I really regret not just getting the whole series from Amazon now.
The image on the left in your first post looks like it is being rendered with Enhanced Typesetting based on the look of the drop cap and the use of hyphenation. If your PW2 is reasonably up-to-date with firmware and that book was delivered to the device directly from Amazon then it would be in KFX format, not AZW3.

Have you made sure that that book is actually AZW3 format on your kindle?
jhowell is offline   Reply With Quote
Old 01-28-2018, 12:39 AM   #14
Pepper Breath
Junior Member
Pepper Breath began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Paperwhite 2
So just a quick update. I adjusted the font size from 340% to something like 470% so that it looked correct on the edit preview in Calibre's editor. When I transferred, the drop cap looked exactly the same size as the incorrect images above, however the surrounding words were not in a nicely spaced box around it, but looked like they were more loosely arranged around it.

Basically the actual drop cap letter isn't responding to the increased font size, but the surrounding words are spacing around as if it is (if sloppily). So it seems that after conversion, the drop cap reaches a max size and then just shuts down.

Quote:
Originally Posted by jhowell View Post
The image on the left in your first post looks like it is being rendered with Enhanced Typesetting based on the look of the drop cap and the use of hyphenation. If your PW2 is reasonably up-to-date with firmware and that book was delivered to the device directly from Amazon then it would be in KFX format, not AZW3.

Have you made sure that that book is actually AZW3 format on your kindle?
It's definitely AZW3 and not KFX. To clarify, it's straight from Amazon, but I downloaded from the website and sideloaded to my kindle. For the most part, I keep my kindle on airplane mode.
Pepper Breath is offline   Reply With Quote
Old 09-17-2018, 06:59 AM   #15
MaxM
Junior Member
MaxM began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2017
Device: Calibre
Different dropcap

Hi there,

I used the following and it was working like a year ago:
<p class="calibre"><span class="dropcap">U</span> - problems with text-align: justify
PHP Code:
.dropcap {
  
color#900;
  
floatleft;
  
font-size3em;
  
font-stylenormal;
  
line-height0.8em;
  
margin-bottom: -0.2em;
  
margin-right3pt;

I changed it to what I found today - working at least for calibre reader, Readium, and BlueFireReader:
<p class="first-paragraph"><span class="char-style-override2">D</span>
PHP Code:
.char-style-override2 {
    
color#900;
    
floatleft;
    
font-size2.753em;
    
line-height0.9;
    
margin-bottom: -0.245em;
    
margin-right0.1em;
    
margin-top0.04em
    
}
.
first-paragraph {
    
displayblock;
    
font-size1em;
    
font-stylenormal;
    
font-variantnormal;
    
font-weightnormal;
    
line-height1.25;
    
text-alignjustify;
    
text-decorationnone;
    
text-indent0;
    
margin0 0 2px
    

Try for your azw - its not my kind of stuff.
Good luck,
Max
MaxM is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre changes drop cap on converting epub -> azw3 AlanHK Conversion 19 02-14-2020 10:24 AM
Drop cap bug on Paperwhite dgatwood Kindle Formats 11 04-10-2014 04:14 AM
Aura HD Drop Cap coding help, please MacEachaidh Kobo Reader 13 08-15-2013 01:18 PM
Converting azw3 to epub: character encoding issue. meunierd Conversion 3 01-10-2013 10:11 AM
Using CSS in Word to make a Drop Cap work in an Epub brewt ePub 3 01-31-2009 06:00 PM


All times are GMT -4. The time now is 06:08 AM.


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