View Single Post
Old 04-21-2019, 01:27 PM   #5
JonnieCache
Junior Member
JonnieCache began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2019
Device: Kindle Oasis, iPad Pro
Quote:
Originally Posted by kovidgoyal View Post
You can use the Transform styling tool to adjust CSS properties, should work for the "font-family" property in @font-face rules as well, though I have not tested. See the Look & feel section of the conversion dialog.
Thanks for the reply, Kovid! I'm so happy you responded personally! I really appreciate it! I've donated in the past, but I just donated some more. I really LOVE the software. Keep up the great work!

I thought that the transform styling tool should work for that purpose. But when it didn't work, I thought perhaps @font-face rules were deliberately excluded for some (technical?) reason. So, it seems this may just be a bug in the conversion process when Calibre applies the transform rules.

Here is a screenshot of some of the transform rules that I've set up:

Click image for larger version

Name:	Screen Shot 2019-04-21 at 11.26.41 AM.png
Views:	139
Size:	888.4 KB
ID:	170833

Here are a couple screenshots of the original eBook CSS before conversion:

Click image for larger version

Name:	Screen Shot 2019-04-21 at 11.30.22 AM.png
Views:	137
Size:	916.3 KB
ID:	170835
Click image for larger version

Name:	Screen Shot 2019-04-21 at 11.25.47 AM.jpg
Views:	125
Size:	533.5 KB
ID:	170834

Then after conversion, here are a couple of screenshots. You can see that the @font-face rules were not transformed.

Click image for larger version

Name:	Screen Shot 2019-04-21 at 11.27.39 AM.jpg
Views:	135
Size:	509.8 KB
ID:	170836
Click image for larger version

Name:	Screen Shot 2019-04-21 at 11.27.49 AM.jpg
Views:	168
Size:	494.2 KB
ID:	170837

I would like to embed the fonts in all of my EPUBs if they aren't included already. Although I realize this increases the size of the books, I would like to view the books as they were intended by the author/publisher.

I'm not a font expert, but as I understand it, the problem with the embedding process is due to how different platforms (macOS, Windows, Linux) refer to the fonts and also differences between identification of .TTF and .OTF versions of the same font across the platforms. In the CSS, the font may be listed as "AJensonPro-Lt" (from Windows?), but macOS sees it as "Adobe Jenson Pro Lt". So, when Calibre tries to embed the font, it doesn't see the font from macOS as it is listed in the CSS.

I realize that this may be a big undertaking, but font substitution would be a cool feature to add. That way, the user could set up the fonts to substitute, not only for editing, but also for previews and the E-Book Viewer. I wish the OSs would support font substitution natively and allow users to tweak them.

Let me know your thoughts..

Thank you in advance!

Jonathan

Last edited by JonnieCache; 04-21-2019 at 03:21 PM.
JonnieCache is offline   Reply With Quote