![]() |
#107 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 464
Karma: 1006520
Join Date: Mar 2010
Location: Alberta, Canada
Device: Kindle PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#108 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 16056
Join Date: Dec 2011
Device: Sony PRS T1
|
Hi, I'm using sylfaen.ttf for unicode. Does it hav bold and italic? How do I specify those in @font-face statement?
@font-face {font-family: serif; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/sylfaen.ttf);} body, div, p { font-family: serif; } .calibre { font-family: serif; } that's what I'm using and it's working. Now I need bold and italic, how do I go about it? THanks |
![]() |
![]() |
![]() |
#109 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You're best off finding a different font that has regular, bold, italic, & bold italic.
|
![]() |
![]() |
![]() |
#110 | ||
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
buttonBookFontSelect_Amasis buttonBookFontSelect_Frutigerneue buttonBookFontSelect_Original buttonBookFontSelect_Palatinonova buttonBookFontSelect_Reallyno2 buttonBookFontSelect_Universnext buttonBookFontSelect_Verdana That same list of fonts appears in a few other places, so it seems that the font list for the built in reader app is fixed and not dynamic. ![]() If you root, you can use a different reader app (FBreader, CoolReader), but these don't seem as polished (eg, the periodical format is lacking). Quote:
I'm starting to wonder if one solution is to try to import a user CSS? Maybe something like @import url(res:///mnt/sdcard/css/my.css); or if that doesn't work even something like @import url(res:///ebook/fonts/../../mnt/sdcard/css/my.css); in each epub. Sure that means you still need to add that line to everything, but if it works then at least you don't then need to regenerate every epub if you decide you like a different font later on. Cheers, Simon. |
||
![]() |
![]() |
![]() |
#111 |
Member
![]() Posts: 23
Karma: 12
Join Date: Feb 2011
Device: PRS-950, T1
|
Here's what I do to change my font at will for all of my 124 epubs on an unrooted T1:
I created a 'fonts' directory at the root when plugged into a windows machine. Inside this folder I put all of the fonts I want to use. I then created a simple batch file asking which font I want to use. The batch file copies each of the four font variants into normal.otf, italic.otf, bold.otf, and bolditalic.otf. Now the hard part about this is modifying each epub with the proper @font entries: Code:
@font-face { font-family: "Serif"; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/normal.otf); } @font-face { font-family: "Serif"; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/bold.otf); } @font-face { font-family: "Serif"; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/italic.otf); } @font-face { font-family: "Serif"; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/bolditalic.otf); } Code:
@page { margin: 0em .25em 0em .25em } body { display: block; margin: 0 0 0 0; padding: 0 0 0 0; border: 0 0 0 0; text-align: justify; font-family: "Serif"; font-size: 0.9500em; line-height: 1.0525em; } p, div { display: block; margin: 0 0 0 0; padding: 0 0 0 0; border: 0 0 0 0; orphans: 0; widows: 0; } Once all that was done, the batch file I wrote earlier that decompresses the epubs, also recompresses them all into a folder named 'recompressed'. So I run that. Then I fire up Calibre, make a new library from the 'recompressed' folder, and either/both save to disk/send to device. Now all I have to do to change the font is connect the T1 to my computer, engage data transfer mode, open the fonts directory on the T1, and run the batch file that changes the fonts. Maybe someone is looking for a similar solution, so if this helps anyone, great. If anyone else has some other ideas to make this easier that would be welcome. For instance, I don't know very much at all about linux, but I had the idea that if a script similar to the fonts.bat file could be written and executed on a rooted T1, then the device wouldn't have to be connected to a computer to change the font. I believe this method is similar to how PRS+ changes the user css style sheet. |
![]() |
![]() |
![]() |
#112 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() Create a /css directory in the root of int.mem and place my.css file (containing all the @font-faces etc) in there. Then insert your suggestion of the single line Code:
@import url(res:///ebook/fonts/../../mnt/sdcard/css/my.css); Now, when you fancy a change of font(s) all you have to do is replace the my.css file with your new one in the /css directory on the T1. Nice thinking, snarkophilus, karma to you ![]() Last edited by jackie_w; 01-04-2012 at 08:40 PM. Reason: correct error |
|
![]() |
![]() |
![]() |
#113 |
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Thanks Jackie. I'm glad both that the idea worked, and that it wasn't too hard to do!
It also works here as well. I'm also pretty happy that the same epub works on my PRS-350 too, so the @import pointing to a file that doesn't exist doesn't cause problems (on the 350 at least). The next thing I'm wondering if how hard it would be to automate adding that @import to every epub in my Calibre library. Some epubs have multiple CSS files, so you can't just blindly add the @import to every CSS you see. I wonder if the "Modify Epub" plugin is the right place for this (with some generic "make sure this CSS line is present in an epub" method)? Cheers, Simon. |
![]() |
![]() |
![]() |
#114 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
Just a thought? |
|
![]() |
![]() |
![]() |
#115 | |
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
![]() One thought - we might want a way to disable this on specific books. For example, Jellby's "Three Men In A Boat" is already formatted beautifully, and I'm not sure I'd want to add my own styles for that one. Cheers, Simon. |
|
![]() |
![]() |
![]() |
#116 | ||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 16056
Join Date: Dec 2011
Device: Sony PRS T1
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#117 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Oct 2011
Device: PRS-900
|
I've compiled a short how-to page for using external Viet fonts based on previous posts:
http://www.mediafire.com/?w9zp1h5zypmfzw5 |
![]() |
![]() |
![]() |
#118 |
Junior Member
![]() 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; } (...) 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. |
![]() |
![]() |
![]() |
#119 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Try changing all occurrences (@font-face and body) of font-family to
Code:
font-family: serif; Also, there is a bug in the Sony firmware reader app, where italics and bold are not displayed consistently when using any font other than 'Original'. Forum member Morkl has written an updated reader app which corrects this fault and gives a few extra nice features. There is a bit of a snag though. The latest release was written to work with Sony firmware version 1.0.03.11140. There has not yet been a full release which incorporates the Sony upgrade to version 1.0.04.12210. You can read more about Morkl's PRST1 enhancements in this thread and this thread. P.S Welcome to MobileRead ![]() Last edited by jackie_w; 05-19-2012 at 03:00 PM. Reason: extra info |
![]() |
![]() |
![]() |
#120 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2012
Device: Sony PRS-T1
|
Thanks a lot, it works! I also think I will try to downgrade to 1.0.03.11140 and give Morkl's enhancement a try.
Last edited by Ravenik; 05-19-2012 at 08:55 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hacks how to return to the original font | lizayin | Amazon Kindle | 1 | 07-07-2011 07:25 PM |
Changing original font css in ePub | jlbfoot | Sony Reader | 4 | 12-28-2010 12:07 PM |
Troubleshooting Font size changing | Kumabjorn | Amazon Kindle | 1 | 07-23-2010 12:49 AM |
DR1000 Changing Font-Size | ThR | iRex | 6 | 06-21-2010 06:29 AM |
Book Conversion - Changing Original Texts | RWood | Sony Reader | 13 | 04-18-2007 01:28 PM |