![]() |
#46 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The correct place for that is in the Check Book tool: https://github.com/kovidgoyal/calibr...8301e8bf1c881d
|
![]() |
![]() |
![]() |
#47 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
Good point to have this information available.
Is it maybe thinkable to have this information via command line tools available too? |
![]() |
![]() |
Advert | |
|
![]() |
#48 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If someday I create a command line interface for check book, sure.
|
![]() |
![]() |
![]() |
#49 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
+1
![]() |
![]() |
![]() |
![]() |
#50 |
Interested in the matter
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#51 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
|
So I ran into another issue I either wasn't seeing, or was unaware of earlier.
When converting from docx, even after embedding the font, Calibre doesn't appear to reference the base font in stylesheet.css. To be clear the only font it doesn't reference in that way appears to be the "base font" or body text font. I use the term "base font" because that's the nomenclature the conversion tools use. Even if I specify, during the conversion, that Arial is the base font it does not reference Arial. It does not do this for other headings. So, in this same document, the headings are Arial, and they are referenced. It doesn't matter whether the font is embedded in the docx file or not. The font gets embedded now, and there is a font-face definition, but it isn't referenced in the stylesheet. Calibre generates this code: Code:
.block_5 { color: black; display: block; margin: 0 0 12pt; padding: 0 } Code:
.block_5 { font-family: "Arial", sans-serif; color: black; display: block; margin: 0 0 12pt; padding: 0 } For the heading Calibre generates: Code:
.block_11 { color: #2E74B5; display: block; font-family: "Arial", sans-serif; font-size: 2em; font-weight: normal; line-height: 1.08; page-break-after: avoid; page-break-inside: avoid; text-align: center; padding: 0; margin: 12pt 0 0 } Why the disparity? |
![]() |
![]() |
![]() |
#52 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I need a sample docx file to tell you more.
|
![]() |
![]() |
![]() |
#53 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
|
Hi Kovid,
I've attached one here. (FYI, the file I attached is a docx file. The forum doesn't like me uploading a docx file, so I renamed to doc. You should rename to docx before you start tinkering I think.) In this Word file the heading is Cochin LT. Calibre generates this css for the heading: Code:
.block_ { display: block; font-family: "Cochin LT", serif; font-size: 2em; font-weight: normal; line-height: 1.2; page-break-after: avoid; page-break-inside: avoid; text-align: center; padding: 0; margin: 12pt 0 0 28.8pt } The base font / body text is supposed to be Arial Calibre generates this: Code:
.block_1 { color: black; display: block; line-height: 1.2; padding: 0; margin: 0 0 12pt } Calibre generates this: Code:
.block_4 { color: black; display: block; font-family: "URW Palladio L", serif; font-size: 0.75em; padding: 0; margin: 0 0 8pt 28.8pt } I am not even sure I understand how Calibre gets the blue color to show in headings, when the CSS doesn't specify a color. The only color reference is waaay down in the stylesheet: Code:
.calibre { color: #2E74B5; display: block; font-family: "Arial", sans-serif; font-size: 1em; padding-left: 0; padding-right: 0; margin: 0 5pt; } Although, if I remove it, the heading loses its blue color, and the base font is no longer Arial. Curiouser and curiouser. ![]() Last edited by hidden.platypus; 11-26-2016 at 11:49 AM. Reason: Typo |
![]() |
![]() |
![]() |
#54 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,732
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@hidden.platypus - if you look at the Live CSS Panel in the editor, it will show the styles that are used to create the 'final style'.
I imported your docx into editor, here are a couple of examples of what I'm seeing in Live CSS. I don't see the problem - the final styles have a font specified. And what I see in Word, the editor preview, and the ebook viewer, look pretty much the same to me. Here is the style sheet the DOCX import generated Spoiler:
BR Last edited by BetterRed; 11-26-2016 at 03:48 PM. Reason: added style sheet |
![]() |
![]() |
![]() |
#55 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
|
Hi Red,
Thanks for showing me a new tool. Was not aware there was a live CSS preview. The stuff that you have in the spoiler text includes a few comments. Are those comments yours, or were they generated in the stylesheet. If they are not yours, mine definitely does not generate that way. I do not have a body style in my stylesheet. I see you have the do not split on page breaks option enabled. Even when I convert like that, I don't get a body style. Are you on a PC? |
![]() |
![]() |
![]() |
#56 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@hp: BetterRed is showing you the result of directly importing the docx file into the editor rather than first converting to EPUB Use File->Import a DOCX or HTML file as a new book to get the same result. This is a better route to go if you intend to edit the epub, as the conversion flattens the css making it harder to edit it.
|
![]() |
![]() |
![]() |
#57 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
And as for your question,
the .calibre style is what is used for the body via the class attribute. (conversion, as I mentioned before, flattens all CSS, converting it into classes). Use the Live CSS tool in the editor as BR showed you to see the effective styles that apply to any element. |
![]() |
![]() |
![]() |
#58 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,732
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@hp - my "I imported your docx into editor" and "style sheet the DOCX import generated" were intended as subtle hints you should use the same approach
![]() The CSS is what the import produced, so the comments are Kovid's. I can't recalling seeing a split on breaks option for DOCX import. Many of my DOCX imports/converts are relatively short, so I prefer to start with one file, and then if needs be, split it myself. Yes on a PC. BR |
![]() |
![]() |
![]() |
#59 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
|
I neglected to say Thank you to both of you before you.
I apologize. Thank you both. |
![]() |
![]() |
![]() |
#60 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jul 2017
Device: Kindle fire
|
Calibre epub to Nook not showing specialized fonts
I am trying to use Calibre to convert my book into epub, then upload to Nook. The conversion worked great creating an ebook that I then used Kindle Previewer to convert to mobi, then uploaded to Amazon. But the epub version shows the fonts correctly, but when it uploads to Nook they disappear. I have selected embedded fonts in the editor, but still no luck. Any ideas, anyone?
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can it embed fonts? | chalimac | Kobo Reader | 1 | 06-27-2017 05:46 PM |
How to embed fonts in ePub after Calibre | fiery | ePub | 79 | 12-05-2016 02:18 AM |
Is it possible to really embed fonts yet? | LaurelRusswurm | ePub | 25 | 11-17-2011 10:25 PM |
Is it possible to UN embed fonts? | lmronan | Sigil | 14 | 06-04-2010 09:26 AM |