View Single Post
Old 10-03-2017, 04:49 PM   #4
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,195
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by Dfaure View Post
That's fair.

I just wanted to use the calibre viewer in the same way I could do with a physical e-book reader.

Thanks to the user stylesheet parameter I can specify my own fonts for the ebook rendering, but these should be registered in the hosting system.

How could I do that without being obliged to install fonts on each computer I could use?
Open the e-book viewer go to "preferences" then "User_stylesheet" then use the following code with your font.

Code:
body {
  font-family: "MyFont", serif;
}
@font-face {
  font-family : MyFont;
  font-weight : normal;
  font-style: normal;
  src : url(MyFont.otf);

@font-face {
  font-family : MyFontBold;
  font-weight : bold;
  font-style: normal;
  src : url(MyFontBold.otf);
}
@font-face {
  font-family : MyFontItalic;
  font-weight : normal;
  font-style: italic;
  src : url(MyFontItalic.otf);
}
@font-face {
  font-family : MyFontBoldItalic;
  font-weight : normal;
  font-style: BoldItalic;
  src : url(MyFontBoldItalic.otf);
}
Replace the Myfont... with the name and path of the font you are using.

example src : url(...\calibre\resources\fonts\MyFontBoldItalic.o tf)

Copy the font you would like to use into the font folder of the calibre portable.

That should work do not have a calibre portable to test.

bernie
gbm is offline   Reply With Quote