Thread: Firmware Update Fw 5.8.11 update
View Single Post
Old 10-15-2017, 11:43 AM   #153
shamanNS
Guru
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: 946
Karma: 10500004
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
Quote:
Originally Posted by j.p.s View Post
Those are not the default sizes.
The default sizes are hardcoded inside Java bytecode inside some .jar files on Kindle's system partition. So someone wih SSH access and Java know-how would have to go hunt for that file (the file should be already known from the pre-FONT_RAMP era of redefining font sizes; I use to do that for my PW1 ) and then find those 14 values embedded somewhere in all that code just so you could take a look. By default there is no FONT_RAMP file on your Kindle...

As I don't really see the point of knowing default values when you can simply write 14 random 2 decimal number between say 7.00 and 13, in steps of say .40 increments and test that on your Kindle, when you find close to ideal size (and have idea how much bigger is that 0.40 "step") you go ahead and adjust a number. Since you'll ever need 1-3 "good sizes" at most it doesn't really matter what numbers are chosen for the rest.

You already have a starting point, the example FONT_RAMP. So now just edit & test until satisfied.


EDIT:

This should be it:

Code:
  objArr2 = new Object[2];
        objArr2[0] = "font.size.mapping";
        objArr2[1] = new float[]{6.96f, 7.92f, 8.4f, 9.36f, 10.56f, 11.52f, 12.48f, 13.92f, 15.36f, 17.04f, 19.2f, 22.08f, 25.2f, 29.28f};


...
So (if I'm reading the code correctly ), for english and other (non-Asian/CJK, non-Indic) books default fontsizes are:

Quote:
For 300 ppi devices (PW3, KV, KO):

6.96 7.92 8.40 9.36 10.56 11.52 12.48 13.92 15.36 17.04 19.20 22.08 25.20 29.28

For 212 ppi devices (PW2):

7.13 7.81 8.49 9.17 10.53 11.545 12.56 14.03 15.50 16.98 19.00 22.00 25.00 29.20

For 167 ppi devices (Kindle Basic, KT3 or whatever its name is):

7.33 8.19 9.05 9.92 10.78 11.64 12.93 14.23 15.95 17.68 19.83 22.42 25.87 29.75

Last edited by shamanNS; 10-15-2017 at 12:40 PM.
shamanNS is offline   Reply With Quote