View Single Post
Old 05-19-2012, 02:18 PM   #118
Ravenik
Junior Member
Ravenik began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2012
Device: Sony PRS-T1
Custom font and option to pick font from the built-in list.

Hello, I am a new PRS-T1 user and I try to work out a procedure to convert my books for PRS-T1.
I struggle to have a custom font for given e-book and simultaneously to be able to choose a font from the built-in Sony PRS-T1 font list. I managed to have custom font working (also with "bold" titles in the book) but then I cant change font to one from the list - whichever font I choose it doesn't change and remains with the face of my font. Please help how to have my font (in file-system) and be able to change font for another from Sony built-in list.

Currently I have in stylesheet1.css:
Code:
@namespace h "http://www.w3.org/1999/xhtml";

@font-face {
  font-family: "Serif";
  font-weight: normal;
  font-style: normal;
  src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/LiberationSerif-Regular.ttf);
}
(...)
@font-face {
  font-family: "Serif";
  font-weight: bold;
  font-style: italic;
  src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/LiberationSerif-BoldItalic.ttf);
}

body {  
  font-family: Serif;
  display: block;
}

.bold {
    font-weight: bold;
	margin-bottom: 0.8em;
	margin-top: 0.8em;
	display: block;	
    }
(...)
When I view "LiberationSerif-Regular.ttf" with ttfedit-1.0a-bin - I have:
Font Family: Serif
Font Subfamily: Regular
Full name of the font: Liberation Serif
And similarly in the next 3 .ttf files (subfamily: Bold, Italic, Bold Italic)

I put these 4 font files in two places:
"sdcard": /fonts
"internal": /fonts (if this "internal" directory was empty then the reader would not use my fonts, despite the fact that in css I pointed to sdcard)

As I said it works for my font but does not allow to pick another font from the list. Is it generally possible to use use my font from file and simultaneously have the option to choose from built-in-fonts list for given e-book?

In the built-in font list I have only some fonts with my native Polish characters, so I need my custom font (which is better for me). Also only with my font I can have bold letters for titles in books.
Ravenik is offline   Reply With Quote