01-17-2012, 01:17 PM | #31 |
Resident Curmudgeon
Posts: 75,721
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Original is one setting I would leave alone. It means how the books looks without changing things. Some books such as 11/22/63 have embedded fonts that should be there for the best looking read.
|
01-17-2012, 01:30 PM | #32 | |
Connoisseur
Posts: 62
Karma: 36180
Join Date: Dec 2011
Location: US East Coast
Device: Kobo Aura HD, Kindle 4, Sony PRS-T1 (formerly PRS-500 & 505), iPad Air
|
Quote:
I wish in the Sony internal Settings, there is a default font choice setting as well as the (current) default font size setting. |
|
Advert | |
|
01-17-2012, 04:31 PM | #33 | |
Resident Curmudgeon
Posts: 75,721
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Yes, changing original will change the original look of the ePub. It may not invalidate embedded fonts. It depends on how they are set in the CSS. |
|
01-17-2012, 04:35 PM | #34 | |
Resident Curmudgeon
Posts: 75,721
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
01-17-2012, 05:37 PM | #35 | |
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
|
Morkl - great work! I installed this last night but didn't have a chance to play with it until my train ride this morning. I've also installed your homescreen mod, and that in combination with the reader mod works really well. I'll echo the comments of others here about what a great job you've done in a short amount of time. Some extra karma coming your way.
Now, I'm eagerly awaiting the user css next . Could this be done as simply as replacing one of the existing font-face directives in the smali code? For example, replace @font-face{ font-family: %s; font-style:normal; font-weight:normal; src: url(%s);} with @font-face{ font-family: %s; font-style:normal; font-weight:normal; src: url(%s);} @import url(res:///ebook/fonts/../../mnt/sdcard/css/my.css); I've previously determined that referencing a CSS that doesn't exist doesn't cause problems. If that works, then (hopefully!) it can be made an option but this (should!) be a simple way of verifying that it's that simple to deal with. Quote:
Cheers, Simon. |
|
Advert | |
|
01-17-2012, 05:39 PM | #36 | ||||
Connoisseur
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
|
Quote:
Quote:
However, as far as I know, if a book has its own @font-face declarations, they override any ones (of the same font-family) previously generated by the reader (which is why fonts with @font-face declarations look the same no matter what font is chosen in the select-a-font)? If the embedded fonts as declared as font-family="not serif or sans-serif" they won't be affected by the select-a-font. Quote:
Quote:
|
||||
01-17-2012, 05:42 PM | #37 | ||
Resident Curmudgeon
Posts: 75,721
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
|
||
01-17-2012, 07:29 PM | #38 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Just a FYI. If you do plan on using @import to provide the custom CSS feature then I believe it needs to be the first thing in any internally generated CSS file, i.e. all @import rules come before any @font-face rules. |
|
01-17-2012, 07:42 PM | #39 | |
Connoisseur
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
|
Quote:
New version posted here (just uploaded it; should be available soon). Loose apk and installer for non-rooted devices included. It just prepends "@import url(res:///ebook/fonts/../../mnt/sdcard/css/style.css);" to the CSS (i.e. /mnt/sdcard/css/style.css is loaded if it is there). Would a setting for the file name be useful? I'm thinking, if you're able to modify the settings you're probably able to rename the file just as well, no? |
|
01-17-2012, 07:47 PM | #40 | |
Connoisseur
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
|
Quote:
Interestingly, since the custom CSS is loaded before the @font-face declarations, one can put @font-face declarations for font-family "serif" and "sans-serif" in the custom CSS to replace the original font, since they are overridden by the generated declarations for any non-original font. |
|
01-17-2012, 08:22 PM | #41 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Not having to connect to the PC to make the change would be very convenient. It could be as simple as just copying the selected .css file to the fixed filename style.css in the same directory. Then your modded reader app would work as-is. This is how the PRSPlus custom firmware for the older Sony models handles this feature. |
|
01-19-2012, 12:20 AM | #42 |
Connoisseur
Posts: 62
Karma: 36180
Join Date: Dec 2011
Location: US East Coast
Device: Kobo Aura HD, Kindle 4, Sony PRS-T1 (formerly PRS-500 & 505), iPad Air
|
Morkl,
Again thanks much for the good work. By the way, I'm using the latest version, and found that the font size setting doesn't follow the global setting value (System Settings -> Application Preferences -> Books/Periodicals -> Font Size Preference). I've set the system setting value to a larger font size (the third smallest), but the font size of all the new books that I open with your modded reader app is the system's initial default value, which is the second smallest. FYI, just in case you weren't aware of this issue. Last edited by soseono; 01-19-2012 at 03:51 AM. |
01-19-2012, 11:17 AM | #43 |
Wizard
Posts: 1,370
Karma: 6957792
Join Date: Nov 2010
Location: Ottawa, ON
Device: Kobo H2O
|
Can margins, alignment or line spacing be set in style.css? I tried
html { text-align: justify; } but perhaps I have the wrong syntax. |
01-19-2012, 11:51 AM | #44 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
If it's not working for a particular epub it's probably because some of the css inside the epub is more specific and is overriding your top level setting. This is particularly likely if you created your epub using Calibre, depending on the conversion settings you used. You can try and add more to your style.css to combat the epub's own css. If you are a Calibre user you could try something like Code:
body, body.calibre, body.calibre1, body.calibre2, body.calibre3 {text-align: justify; line-height: ???; margin-left: ???; margin-right: ???} If that still doesn't work, you could try changing the first line to Code:
body, body.calibre, body.calibre1, body.calibre2, body.calibre3, div, p
I'm afraid, with epubs there's no "automatic magic solution" which works 100% of the time. An alternative option is to use one of the other epub reading apps (FBReader, CoolReader) rather than the Sony reader or Morkl's much improved modified version. You would need to root your T1 to do that. Those apps ignore most (all???) the css inside the epub and let you define your own settings. This is why many people like these apps. The problem is that you may not want ALL the epub css to be ignored if it's a well-formatted epub. In this case the Sony app is better option, especially with Morkl's changes. You just have to decide which approach you prefer. Last edited by jackie_w; 01-19-2012 at 12:09 PM. Reason: alt option |
|
01-19-2012, 01:47 PM | #45 |
Wizard
Posts: 1,370
Karma: 6957792
Join Date: Nov 2010
Location: Ottawa, ON
Device: Kobo H2O
|
Thanks jackie_w, it worked!
|
Tags |
css, fonts |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-350 Changing Fonts in PRS+ | spacebrew | Sony Reader Dev Corner | 31 | 08-24-2012 06:29 AM |
PRS-350 PRS 350 & PRS+: Changing LRF-fonts permanently | Analogus | Sony Reader Dev Corner | 21 | 11-08-2011 11:55 AM |
Am i doing it right?PRS+ and CSS forced Epub fonts via Calibre | melkorbauglir | Sony Reader | 20 | 07-29-2011 10:09 AM |
How does the fonts of PRS-350 and PRS-650 compare to each other? | lkkmaths | Sony Reader | 16 | 04-08-2011 07:43 PM |
Changing text size and fonts with PRS 505 | levi_john | Sony Reader | 1 | 01-20-2009 03:25 AM |