View Single Post
Old 11-14-2016, 04:29 PM   #20
shamanNS
Wizard
shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.
 
Posts: 1,127
Karma: 12345678
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
Ok, I did a quick test. It works (for some fonts) but either it's buggy or it uses some kind of whitelist for family names. Didn't work with "Charis SIL Modified", my mod of Palatino (reduced line height/ descender property) and couple of random Windows fonts.

Like, "Adobe Garamond Pro" and "Minion Pro" are displayed correctly but for fonts that don't get used/recognized correctly those paragraphs are displayed using sans serif font (probably Helvetica). Custom fonts themselves are of serif type.

Naming (probably) needs to be the same as for fonts hack (Name-Regular, Name-BoldItalic, ...). You dump the ttf files inside "fonts" folder in Kindle drive root, and in CSS classes just use font-family: "Adobe Garamond Pro";. No need to embed fonts or use @font-face to declare it using "src: blabla.ttf".

Quote:
.f_garamond {
display: block;
font-family: "Adobe Garamond Pro";
margin: 0;
}
Restart Kindle after adding new font files.

Tested on PW3 fw 5.6.5 (jailbroken and with fonts hack installed) with an .azw3 file.

Last edited by shamanNS; 11-14-2016 at 04:33 PM.
shamanNS is offline   Reply With Quote