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 11-12-2023, 10:55 AM   #1
xtraktor
Member
xtraktor began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
Font embedding problem from html conversion

Hi!

When I convert from html it always embeds the fonts incorrectly, because it doesn't display the font type. Is there any way to fix this?

Example from html:
.calibre {
display: block;
font-family: "Times New Roman";
font-size: 1em;

Example from docx:
.calibre {
display: block;
font-family: "Times New Roman", serif;
font-size: 1em;

Thx in advance!
xtraktor is offline   Reply With Quote
Old 11-12-2023, 11:11 AM   #2
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,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
That is not 'incorrectly', the HTML is missing a fallback (serif in this case), that is used if the named family has no font.

BTW is there a font in the fonts folder of the book and an @font-face in the CSS? That is the imported font, not the use this family entry
theducks is offline   Reply With Quote
Advert
Old 11-13-2023, 01:03 AM   #3
xtraktor
Member
xtraktor began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
Quote:
Originally Posted by theducks View Post
BTW is there a font in the fonts folder of the book and an @font-face in the CSS? That is the imported font, not the use this family entry
Yes, there is. I only see this error when I run a check in Calibre.
xtraktor is offline   Reply With Quote
Old 11-13-2023, 05:29 AM   #4
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,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
It is just a (best practice?) Warning.
You can Ignore if the conversion is for your own use. (I do...) or simply type in the fallback .
theducks is offline   Reply With Quote
Old 11-13-2023, 12:05 PM   #5
xtraktor
Member
xtraktor began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
Quote:
Originally Posted by theducks View Post
...or simply type in the fallback .
I can manually enter the type for each letter, but I would like Calibre to do it automatically.
xtraktor is offline   Reply With Quote
Advert
Old 11-13-2023, 04:54 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@xtraktor - if you have a .DOCX convert that, the saving of HTML from MS Word is a legacy from older versions of Word (pre 2007) that created unfathomable .DOC format files.

BR
BetterRed is offline   Reply With Quote
Old 11-14-2023, 03:03 AM   #7
xtraktor
Member
xtraktor began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
Quote:
Originally Posted by BetterRed View Post
@xtraktor - if you have a .DOCX convert that, the saving of HTML from MS Word is a legacy from older versions of Word (pre 2007) that created unfathomable .DOC format files.

BR
I originally tried with Office 2016, but your reply made me try Office 365, but it just doesn't display the font type, although it is in HTML, but not in Calibre's epub.
xtraktor is offline   Reply With Quote
Old 11-14-2023, 03:59 AM   #8
xtraktor
Member
xtraktor began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
@BetterRed
Thanks for the advice, because although Calibre can't interpret Word's HTML correctly, I can fix it automatically with Notepad and it's fine.
xtraktor is offline   Reply With Quote
Old 11-14-2023, 10:56 AM   #9
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,169
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
MS Word's HTML output was terrible on Word XP / 2002. I had to edit it in a text editor for ANY application (mobipocket creator, websites, calibre etc).

The docx seems to work best with Calibre (Word 2007 and later), also on LO Writer an extra Save As in docx, but only save/load edit odt (even if original was docx).

Word 2003 seems to be only version that properly works on WINE, though Word 2007 somewhat.

I added a plug-in on Word2007 on Win7 so I could have proper menus. LO Writer lets you have either GUI scheme.
Quoth is offline   Reply With Quote
Old 11-14-2023, 01:21 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Quoth View Post
I added a plug-in on Word2007 on Win7 so I could have proper menus. LO Writer lets you have either GUI scheme.
Does that imply, LO Writer now supports ribbons.

I've discovered features via Word 2007's ribbons, that I'm not sure even existed in the rat nest of incoherent menus and haberdashery bars in earlier versions of Word. Which the various incantations of Writer (OO, Apache, LO) dutifully followed like a faithful dog's breakfast.

I can drive a well designed Ribbon UI (like those in MS Office) with ONE finger, as well configure them as I want.

BR
BetterRed is offline   Reply With Quote
Old 11-15-2023, 04:17 AM   #11
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,169
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by BetterRed View Post
Does that imply, LO Writer now supports ribbons.

I've discovered features via Word 2007's ribbons, that I'm not sure even existed in the rat nest of incoherent menus and haberdashery bars in earlier versions of Word. Which the various incantations of Writer (OO, Apache, LO) dutifully followed like a faithful dog's breakfast.
For ages.
In Versions 6.4 and similar
https://itsfoss.com/libreoffice-ribbon-interface/
https://help.libreoffice.org/6.4/lo/...ebook_bar.html

Version 7.4
https://help.libreoffice.org/7.4/lo/...ED&System=UNIX
(Experimental option not needed)

There is a problem (stupid setting) in some MS products. The "Hide infrequently used menu items" (or similar setting). If that's off, nothing is missing.
An adaptive GUI/Menu based on usage is the most stupid idea ever. Infrequently used stuff might be important and should always be at the same place. Since XP I have been turning that stupidity off (includes personalised menus).
Toolbars (or Ribbons) can / should be customisable, but only if the full menu system is accessible and never changes.
Maybe a ribbon is handier in touch.

The only toolbars/windows I have on LO Writer since about 5.x (now on 7.4?) are:
A customised Formatting with most direct formatting removed (2x kinds of reset, bold, italic strike, super, sub)
The Paragraph/character/graphics/Page style list, set to show Applied Paragraph Styles by default.


(Customised XP Metallic theme on Mate desktop running on Linux Mint 21.2
The Outline/Navigator window.
These used to be floating outside main window, but 7.x broke that, only docked works properly now.
Click image for larger version

Name:	Screenshot at 2023-11-15 09-25-06.png
Views:	27
Size:	473.0 KB
ID:	204715

I seem to have somehow disabled Notebookbar (Ribbon), because the View -> User Interface isn't on mine, though I have a setting for Icon size on the Notebookbar.

I do remember having it once.

Here are settings for it
Click image for larger version

Name:	Screenshot at 2023-11-15 09-41-22.png
Views:	22
Size:	68.4 KB
ID:	204716

EDIT
Mystery solved. "User Interface" menu item wasn't in the View Menu. The "Menus" Tab of panel shown at "Notebookbar" let me add it in.

And when you go back to previous view all the docked toolbars at the side have gone back to system default! So I'm removing it again!
You can completely customise ANY/ALL menus, toolbars, Notebookbar (ribbon) in Libre Office. It's only following MS Office by default for convenience of MS Office users. Also trivial to change the theme, icon set used etc. Always customise Autocorrect etc when you install. I add dictionary and grammar plug-ins and use custom dictionaries. I also remove alternate (but correct) spellings from the main dictionary (after backup) via text editor as documents need to use only one spelling. More common in British English than USA English.

Last edited by Quoth; 11-15-2023 at 05:08 AM.
Quoth is offline   Reply With Quote
Old 11-15-2023, 06:32 PM   #12
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
If you call that a Ribbon you'll need something to hold it together

Someone showed me that in action last year. Due to the departmental secretary's ideological bent she is forced to use LO Writer when she works in the office. But when she works from home she uses MS Word… on the same documents, which includes Parliamentary Bills!

I've yet to see a Linux or MacOS application (other than MS Word for Mac) that implements a user interface that conforms to the Fluent 'standards'.

Former colleagues who design and develop bespoke enterprise applications tell me its not easy to transition away from menu and button bar centric UI design. Apparently its more of a mindset issue than a cognitive one… I'm the same with database, I think in networks, which I then have to shoehorn into relational

BR
BetterRed is offline   Reply With Quote
Old 11-16-2023, 06:08 AM   #13
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,169
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
MS Fluent is horrible, IMO.

I didn't include any Ribbon screen shots. Server 2003 had last decent Windows GUI, though at least on Vista (and mostly Win7) you could turn off stupidity. On XP you had to turn off a lot of stupid too.

Very bad idea to move SAME document back and forth between any two different applications. LO Writer is converting each time if you open docx. Stick to MS Word or LO Writer. IMO anything else is madness, unless it's plain text in a text Editor (Jota, Notepad++, KATE etc). I've various versions of MS Office and Word for Windows from Word 2.0a to Word 2007. I did prefer MS Word for DOS to Wordstar and Wordperfect (DOS). I wasn't much impressed with Star Office on Windows 3.11.

Last edited by Quoth; 11-16-2023 at 06:15 AM.
Quoth is offline   Reply With Quote
Old 11-16-2023, 04:28 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
My Mileage Does Vary - I'm a member of a group of over a dozen contributors who have collaborated to create and publish in excess of 150 long form journal articles over the past several years using MS Word and/or Writer on Windows, MacOS and several Linuxes using DOCX exclusively.

Sheesh - if a lawyer working in a Parliamentary Library writing Bills and such like works exclusively with DOCX in Word and Writer - who am I to argue. Why don't they use ODT… because the IT systems operations managers say they can't.

BR
BetterRed is offline   Reply With Quote
Old 11-17-2023, 08:54 AM   #15
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,169
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by BetterRed View Post
My Mileage Does Vary - I'm a member of a group of over a dozen contributors who have collaborated to create and publish in excess of 150 long form journal articles over the past several years using MS Word and/or Writer on Windows, MacOS and several Linuxes using DOCX exclusively.
The things that go wrong editing the same document in docx multiple times on LO Writer rarely affect appearance or print. The changes are more subtle.

Going between widely different versions of Word that support docx can make subtle changes as much as Word <-> LO Writer round trips.

It very much depends on what features are used and if end result is PDF, print or import to something else (like Calibre). There is also more than one version of odt and MS "doc" is a minefield of versions, several of which can't even be opened in current MS Word.

I have various versions of Word for Windows, Wordpad and even MS Works on different VMs and actual HW. And historically Wordstar 2000 (long before year 2000) was actually completely different DOS format and DOS program to earlier CP/M and DOS Wordstar.

This is a problem as old as computers. At least I've not had to deal with EBCDIC for many decades, but even up to 2003 I was using some email that was 7 bit ASCII and no Unicode etc and many older wordprocessors were 7bit and used 8bit ASCII code space for various formatting. The only Perl script I ever wrote and debugged removed all soft returns and generated 7bit ASCII paragraphs from one version of Wordstar format. The files came from 3" and a 3.5" Amstrad floppies mounted using the last mobo I have that has a floppy port and can run a current Linux (USB floppy drives only read FAT12 MSDOS format). That machine also has a Z80 emulator, vanilla CP/M on that and a "Joyce" PCW emulator that works with real boot disks. All of that came as "compile it yourself" C source and a nightmare getting all the dependency libraries. I won't build that again ever. Makes installing Win 3.0 on DOS Box seem simple.
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem embedding font SigilBear Sigil 11 06-18-2020 10:43 AM
Another problem embedding font Alabala ePub 26 08-02-2012 05:19 PM
Problem embedding font for Sanskrit northstar7 ePub 11 07-18-2012 02:47 AM
Problem embedding font into an ePub mvo ePub 16 01-03-2012 07:10 PM
Another font embedding problem b.tarde EPUBReader 12 03-11-2010 01:40 PM


All times are GMT -4. The time now is 03:57 PM.


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