Commit 7b37b2a5 authored by kollo's avatar kollo

neue Regeln fuer Terminalfontgroesse (Johns Anregung 2016-10-13)

parent 5c2ff95b
......@@ -80,6 +80,10 @@ void gem_init() {
/* Passende Zeichengroesse ermitteln.*/
#ifdef FRAMEBUFFER
/*TODO: Es ist vielleicht ungünstig, das an den Terminalfont zu binden.
*/
/*Das Ziel ist hier, dass ungefaehrr 60 bis 80 Zeichen in eine Zeile passen*/
if(font_behaviour==0) { /* Auto */
if(window[usewindow].w>=1200) load_GEMFONT(FONT_LARGE);
......
......@@ -123,10 +123,12 @@ void Fb_Open() {
screen.pixels = (char *)screen_pixels;
#endif
if(font_behaviour==0) {
if(screen.width/8<20) change_fontsize(0);
else if(screen.width/8<=40) change_fontsize(1);
else change_fontsize(2);
if(font_behaviour==0) { /* This means: auto */
if(screen.width<200) change_fontsize(0); /*5x7 font*/
else if(screen.width<=480) change_fontsize(1); /*8x16 font*/
else if(screen.width<=960) change_fontsize(2); /*16x32 font*/
else if(screen.width<=1200) change_fontsize(3); /*24x48 font*/
else change_fontsize(3); /*32x64 font*/
} else change_fontsize(font_behaviour-1);
/* Now set the padding to zero, otherwise it can happen that nothing is visible
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment