Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2025, 12:45 PM   #1
rockster
Connoisseur
rockster began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Sep 2012
Device: kindle
Overwrite fonts?

Is there a way to overwrite the font in a epub book? I couldn't find option for this. I am using the linux version of Calibre.
rockster is offline   Reply With Quote
Old 09-23-2025, 02:12 PM   #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,531
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can specify whatever CSS you like in the styles section of the viewer preferences including fonts.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-23-2025, 05:39 PM   #3
rockster
Connoisseur
rockster began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Sep 2012
Device: kindle
How is that different than specifying the font in the Fonts section?
rockster is offline   Reply With Quote
Old 09-23-2025, 07:14 PM   #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: 31,180
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by rockster View Post
How is that different than specifying the font in the Fonts section?
Fonts Section is what will be used when a generic is called or no font WAS specified in the stylesheet/book.
Styles is where you make your desires (font family) known. The font must be available (system or embedded in the book)

eg
Code:
@font-face {
  font-family: Cinzel;
  font-weight: normal;
  font-style: normal;
  src: url(fonts/00002.ttf);
}
and the Stylesheet call:
Code:
.first-letter2 {
  float: left;
  font-family: Cinzel, serif;
  font-size: 300%;
  font-style: normal;
  font-weight: normal;
  margin-right: 0.18em;
  margin-top: -0.25em;
  text-decoration: none;
  text-transform: uppercase;
}
Note what i made bold
That is the fallback if the font is not available (should not be needed if embedded in the book)
theducks is online now   Reply With Quote
Old Yesterday, 07:15 AM   #5
rockster
Connoisseur
rockster began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Sep 2012
Device: kindle
i tried this css style, but it didn't work:

Code:
* {
    font-family: "Liberation Serif", serif !important;
}
rockster is offline   Reply With Quote
Advert
Old Yesterday, 03:50 PM   #6
Martinoptic
Bibliophist
Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.
 
Martinoptic's Avatar
 
Posts: 7,384
Karma: 7237230
Join Date: Dec 2021
Location: England
Device: none
Why are you using " ?
Try Liberation Serif rather than "Liberation Serif"
Martinoptic is offline   Reply With Quote
Old Today, 06:22 AM   #7
rockster
Connoisseur
rockster began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Sep 2012
Device: kindle
This css style worked (with ai help):

Code:
@font-face {
    font-family: "my-custom-font";
    src: local("Georgia");
}

* {
    font-family: "my-custom-font", serif !important;
}
rockster is offline   Reply With Quote
Old Today, 09:59 AM   #8
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,180
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Martinoptic View Post
Why are you using " ?
Try Liberation Serif rather than "Liberation Serif"
values with spaces need to be quoted
theducks is online now   Reply With Quote
Old Today, 05:00 PM   #9
Martinoptic
Bibliophist
Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.
 
Martinoptic's Avatar
 
Posts: 7,384
Karma: 7237230
Join Date: Dec 2021
Location: England
Device: none
Thank you.
Martinoptic is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Overwrite CSS during conversion riothamus Conversion 3 09-23-2022 03:42 AM
Merge overwrite/ignore Rellwood Library Management 2 03-08-2017 01:36 AM
New updates don't overwrite? Gazella Calibre 10 12-27-2012 01:45 PM
Force Overwrite Of Tags DagsJT Library Management 2 07-15-2011 10:29 PM
Overwrite language selection? TadW Calibre 2 09-30-2008 04:10 AM


All times are GMT -4. The time now is 07:53 PM.


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