[vgacon] Font height discrepancy, Linux 2.5.x

From: Byron Stanoszek (gandalf@winds.org)
Date: Mon Apr 14 2003 - 16:27:39 EST


To the person(s) who rewrote the vgacon.c &| vt_ioctl.c files for Linux 2.5
(since I don't know your names).. I have a slight problem with font height not
being saved across consoles.

I am the current developer of SVGATextMode and I'm looking for a way to set the
fontheight across curcons[0..MAX_NR_CONSOLES-1].d.vc_font_height through
ioctl() calls, only when using a VGA Console.

The ioctl() with VT_RESIZEX allows specifying a new character-cell height,
however it only appears to set for the Current Console, as per vt_ioctl:872:

                if (vlin)
                        vc->vc_scan_lines = vlin;
                if (clin)
                        vc->vc_font.height = clin;

                for (i = 0; i < MAX_NR_CONSOLES; i++)
                        vc_resize(i, cc, ll);

However, while vc_resize() is called for all consoles, it does Not set a new
font.height. The result is that any font height change will only take effect fo
rthe current VT, even though the VGA Console layer assumes every VT has the
same font style.

For instance, 'setfont' when run on other VTs, uses KBD routines to set the
font, and does not realize that the real number of scanlines on the screen have
changed. It essentially cuts the screen in half. Also, the cursor disappears
on the other consoles as it gets set with the wrong height.

I propose a patch that sets 'curcons[i].d.vc_font.height = clin' inside the
for() loop, however that could have an impact on the VFB module. AFAIK, the
framebuffer allows for different-sized character cells and fonts on different
VTs and doing this would defeat the purpose of having a vc_font.height variable
for each VT.

I would only like to set vc_font.height on all VTs if the underlying module is
a VGA Console and not a framebuffer.

What is the easiest way to do this? Perhaps the module should set a special
flag in the vt structure to determine if a font change affects all VTs (as in
the VGA Console) or only on the current VT (Framebuffer)?

Thank you very much!

 -Byron

-- 
Byron Stanoszek                         Ph: (330) 644-3059
Systems Programmer                      Fax: (330) 644-8110
Commercial Timesharing Inc.             Email: byron@comtime.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:33 EST