View Single Post
Old 01-01-2012, 06:17 AM   #36
astropeak
Junior Member
astropeak is on a distinguished road
 
Posts: 3
Karma: 74
Join Date: Oct 2011
Device: kindle 3
Smile how change font size by modify the source code

Quote:
Originally Posted by Matan View Post
Currently the character width is limited to 8 pixels. The function drawing the characters do not really have this limit, so the issue is only with the font reading function. I intend to fix it sometime, but it is not high in my priority, so patches are welcome.

Note also that you have to provide a font with the desired width and height. The hex format is not standard but the source code includes a bdf2hex script to convert bdf to hex.
Hi, Matan. I want using a larger font size and I viewed the source code. I wonder whether the init_font function in font.c is the font reading function? If so, can I just modify this function and the below two lines in launchpad.c to change font size?

Code:
    if(setVal(sec, "FontHeight", 'i', &lps->fontheight)) lps->fontheight=16;
    if(setVal(sec, "FontWidth", 'i', &lps->fontwidth)) lps->fontwidth=8;
Can you give me some tips? Thanks in advance.

Last edited by astropeak; 01-01-2012 at 06:28 AM. Reason: modify spell error
astropeak is offline   Reply With Quote