Bug 20858

Summary: libvgl does not handle fonts wider than 8 pixels
Product: Base System Reporter: Jimmy Olgeni <olgeni>
Component: binAssignee: Søren Schmidt <sos>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   

Description Jimmy Olgeni 2000-08-26 10:30:01 UTC
The current version of libvgl in 4.1-STABLE does not draw fonts wider than
8 pixels correctly. The code in VGLBitmapPutChar performs some bit
operations that work only with fonts up to 8 pixels in width.

How-To-Repeat: 
This code should draw a full bar near the top left corner of the screen,
but it only draws a pattern. Only the right halves of each character get
drawn, due to the bit handling in VGLBitmapPutChar.

#include <machine/console.h>
#include <vgl.h>

int main (int argc, char *argv[])
{
  VGLInit (SW_CG640x480);
  VGLTextSetFontFile ("blocks.vgl");
  VGLBitmapString (VGLDisplay, 64, 64, "TEST STRING", 
                   7, 0, 1, VGL_DIR_RIGHT);
  sleep (5);
  VGLEnd ();
}

The blocks.vgl is 8194 bytes long, and is made up like this:

0000000 1010 ffff ffff ffff ffff ffff ffff ffff
0000010 ffff ffff ffff ffff ffff ffff ffff ffff
*
0002000
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-28 11:02:10 UTC
Responsible Changed
From-To: freebsd-bugs->sos

Over to maintainer.
Comment 2 Søren Schmidt freebsd_committer freebsd_triage 2000-11-14 09:39:38 UTC
State Changed
From-To: open->suspended

The code was not mean to work with charset more than 8 bit wide. 
I may look into this eventually, a new libvgl project is on 
the horizon.
Comment 3 Søren Schmidt freebsd_committer freebsd_triage 2001-05-30 08:52:30 UTC
State Changed
From-To: suspended->closed

If interrest arises again I'll look at it, for now this 
is simply not supported.