View Single Post
Old 03-08-2015, 02:57 PM   #3
ecostin
Enthusiast
ecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role modelecostin is a good role model
 
Posts: 37
Karma: 160968
Join Date: Sep 2010
Location: Germany
Device: PRS-500-505-700, Kindle3, KT, KPW, KPW2, KV, KOA
Amazing! Amazon plays fair, see below:
Code:
public float[] Sy() {
    J b;
    float[] a = b.YTD("/mnt/us/FONT_RAMP");
    if (a != null && a.length > 0) {
        return a;
    }
    return (float[])ResourceBundle.getBundle("com.amazon.ebook.booklet.reader.resources.ReaderResources").getObject("font.size.mapping");
}

public float[] zy() {
    J b;
    float[] a = b.YTD("/mnt/us/CJK_FONT_RAMP");
    if (a != null && a.length > 0) {
        return a;
    }
    return (float[])ResourceBundle.getBundle("com.amazon.ebook.booklet.reader.resources.ReaderResources").getObject("font.size.mapping.cjk");
}
This means that font sizes can be set without jb and without any patches, by creating said files (FONT_RAMP, CJK_FONT_RAMP) in the root of the USB partition. The content must be, for each file, exactly 8 float values, which correspond to the 8 different font sizes:
[root@kindle log]# cat /mnt/us/FONT_RAMP
7.49 8.43 9.37 10.31 11.25 12.19 13.13 14.07

It works perfectly, although the size of the characters in the font menu (where one taps to select the size) do not change, they stay the same.

A framework or device restart is required after creating the files.

I did not check yet if this works for non-kf8 books.

Last edited by eschwartz; 03-08-2015 at 03:12 PM. Reason: Those code tags are useful ;)
ecostin is offline   Reply With Quote