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 03-15-2021, 02:14 AM   #1
kaldan
Junior Member
kaldan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2020
Device: none
Unable to embed font while using ebook-convert cli

I am trying to embed a font while converting a html file to .epub. For that, I am using this command:
font_family = "Monlam Uni Ouchan2"
f'ebook-convert {out_html_fn} {out_epub_fn} --extra-css=./template.css --embed-font-family="{font_family}" '

i am getting this:
Flattening CSS and remapping font sizes...
Embedding font: Monlam Uni OuChan2
Property: Unknown Property name. [1:48: panose-1]
Source base font size is 15.00000pt

My output epub is showing expected font while i opened it in calibre ebook reader. But when i open it in my ipad using ibook, it is not showing the expected font. please help me!!
kaldan is offline   Reply With Quote
Old 03-15-2021, 02:45 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: 45,190
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You likely will have to add some iBooks specific code to the epub to get embedded fonts to work. Cant remember what it is off the top off my head, but ask in the iBookssub-forum or google ibooks font embedding.
kovidgoyal is online now   Reply With Quote
Advert
Old 04-27-2021, 03:06 AM   #3
kaldan
Junior Member
kaldan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2020
Device: none
Still unable to open in ibook

I have searched regarding your ibook specific code. I referred to this post
https://ebooks.stackexchange.com/que...w-up-in-ibooks
But still it is not working.. Can you please help me
kaldan is offline   Reply With Quote
Old 04-27-2021, 11:48 AM   #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: 44,805
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
If your ebook is epub3, to enable embedded fonts for iBooks, you will need to add <meta property="ibooks:specified-fonts">true</meta> in the metadata section of the content.opf file. The com.apple.ibooks.display-options.xml file is not needed.

Code:
<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="BookId" xmlns="http://www.idpf.org/2007/opf">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:identifier id="BookId">urn:uuid:c6753a11-b049-4b2d-99e5-445b301adab5</dc:identifier>
    <dc:language>en</dc:language>
    <dc:title>[Main title here]</dc:title>
    <meta property="dcterms:modified">2021-04-27T08:47:09Z</meta>
    <meta property="ibooks:specified-fonts">true</meta>
  </metadata>
  <manifest>
    <item id="Section0001.xhtml" href="Text/Section0001.xhtml" media-type="application/xhtml+xml"/>
    <item id="sgc-nav.css" href="Styles/sgc-nav.css" media-type="text/css"/>
    <item id="nav.xhtml" href="Text/nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
  </manifest>
  <spine>
    <itemref idref="Section0001.xhtml"/>
    <itemref idref="nav.xhtml" linear="no"/>
  </spine>
</package>
You can check the Apple Books Asset Guide 5.2.12 for more information (or a cure for insomnia ).
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can ebook-convert cli auto rename when there is a file which will be overwrite? The_book Conversion 1 09-24-2020 10:50 PM
How can I format the TOC in a PDF created by ebook-convert cli command? Lafisrap Conversion 1 07-28-2020 12:04 PM
Multiple input files for ebook-convert or other Calibre CLI tools? tomcam Calibre 1 04-08-2017 04:49 PM


All times are GMT -4. The time now is 09:27 AM.


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