Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-16-2023, 08:10 PM   #1
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
I never realized I could have system font referenced for epub!

I did a quick experiment yesterday just out of curiosity.

I replaced an embedded font with system one by specifying its full path

for example : open style.css and replace "src: url(../Fonts/nameofembeddedfont.ttf)" with "src: url(C:/Windows/Fonts/nameofsystemfont.ttf) for the font family you want to use and it will do the trick.

bear in mind that you have to use forward slash as path separator, like web address.

this is useful when you use an app or device that doesn't have an option to choose the default font. and you can even set different fonts for different parts of the document(like TNR for header, Arial for body etc)

you can install just any 3rd party fonts to your system and use it if the device's offered fonts don't meet your requirement.

if anyone knows about which font is used for which part in a more graphical way, please let me know.

Last edited by tatagi; 03-16-2023 at 08:15 PM.
tatagi is offline   Reply With Quote
Old 03-16-2023, 10:45 PM   #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: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You might get it to work while using the Viewer, but it will fail on any other device.
theducks is offline   Reply With Quote
Advert
Old 03-17-2023, 07:29 AM   #3
Quoth
Still reading
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: 14,030
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by theducks View Post
You might get it to work while using the Viewer, but it will fail on any other device.
Translation: This is a really bad idea.

The proper way to use default system fonts on anything (even old mobi supports 3) is to use a generic family name:
Serif
Sans-serif
monospace (like typewriter, telex, telegram or terminal/console)
cursive (fake handwriting)
fantasy

Ancient kindles only have:
Serif
Sans-serif
monospace


Each ought to also support Normal, Bold, Italic, Bold+Italic.

CSS
font-family:serif;

Oblique, italic and cursive are different:
oblique is making a font slant if there is no italic, but oblique families exist.
Italic fonts don't exactly match the Normal version and are not just merely slanted as in oblique. Called Italic because they were invented or popularised in Italy in typeset books.
Cursive fonts might not be slanted like oblique or italic, though they might be. They give a closer to joined up script style. Clue in name.
Quoth is offline   Reply With Quote
Old 03-18-2023, 08:15 PM   #4
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
my bad! I thought I found the final solution but come to think of it, I was wrong.

But I read books on PC 99% of the time, and for 1% I can just read them in default(ugly) font at worst. not very harmful I think.
tatagi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forma Kobo changes system font after connecting to pc miza001 Kobo Reader 0 01-26-2023 09:00 AM
Forma Changing system font bearthang Kobo Reader 17 05-09-2020 12:38 PM
Touch How can I change system font? AlexViean Kobo Developer's Corner 12 06-06-2017 04:14 AM
Calibre edit book does not embed referenced font dlibke Editor 8 11-07-2016 09:33 AM
Is otf font being supported in KT system? johnleo Kindle Developer's Corner 9 08-16-2012 11:59 AM


All times are GMT -4. The time now is 10:30 AM.


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