kexts: fbcon: add 8x16 bitmap font

This commit is contained in:
2023-06-11 14:53:53 +01:00
parent a75c620dde
commit aa62fa71b0
4 changed files with 58287 additions and 0 deletions

View File

@@ -8,3 +8,4 @@ sources:
- main.c
- fbcon.c
- vgacon.c
- u_vga16.c

View File

@@ -1,4 +1,5 @@
#include <socks/tty.h>
#include "u_vga16.h"
#include "fbcon.h"
#define CELL_WIDTH 8
@@ -87,5 +88,7 @@ kern_status_t init_fbcon_console(struct device *tty, struct device *fb)
priv->tty_ops = &fbcon_ops;
tty->dev_priv = priv;
memset(priv->fb_pixels, 0x00, fb_mode.fb_yres * fb_mode.fb_stride);
return KERN_OK;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
#ifndef U_VGA16_H_
#define U_VGA16_H_
struct bitmap_font {
unsigned char Width; ///< max. character width
unsigned char Height; ///< character height
unsigned short Chars; ///< number of characters in font
const unsigned char *Widths; ///< width of each character
const unsigned short *Index; ///< encoding to character index
const unsigned char *Bitmap; ///< bitmap of all characters
};
extern const struct bitmap_font fbcon_font;
#endif