Man Over Board
Loading...
Searching...
No Matches
font.h File Reference

Header file for font rendering functions. More...

#include "global.h"
#include "raster.h"

Macros

#define SMALL_TEXT_WIDTH   8
 
#define SMALL_TEXT_HEIGHT   16
 
#define BIG_TEXT_WIDTH   64
 
#define BIG_TEXT_SPACING   48
 
#define BIG_TEXT_HEIGHT   65
 

Functions

void drawSmallText (Screen *base, char *str, u16 x, u16 y, BitMapDrawMode drawMode)
 Renders small-sized text on the screen.
 
void drawBigText (Screen *base, char *str, u16 x, u16 y, BitMapDrawMode drawMode)
 Renders large-sized text on the screen.
 
void drawBigTextUnderline (Screen *base, u8 pos)
 Draw a underline under a character when draw at the bottom of the screen.
 

Variables

const u32 glyphs [128][4]
 Glyph data for ASCII characters 0-127.
 
const BitMap depixel []
 Predefined bitmap representations of glyphs.
 

Detailed Description

Header file for font rendering functions.

This file contains declarations for rendering text on a screen. It defines glyph data structures and functions for drawing both small and large text.

Function Documentation

◆ drawBigText()

void drawBigText ( Screen * base,
char * str,
u16 x,
u16 y,
BitMapDrawMode drawMode )

Renders large-sized text on the screen.

Parameters
basePointer to the screen buffer.
strThe null-terminated string to be drawn.
xX-coordinate of the text position.
yY-coordinate of the text position.
drawModeDrawing mode to be applied.

◆ drawBigTextUnderline()

void drawBigTextUnderline ( Screen * base,
u8 pos )

Draw a underline under a character when draw at the bottom of the screen.

Parameters
basePointer to the screen buffer.
posindex of the char to underline

◆ drawSmallText()

void drawSmallText ( Screen * base,
char * str,
u16 x,
u16 y,
BitMapDrawMode drawMode )

Renders small-sized text on the screen.

Parameters
basePointer to the screen buffer.
strThe null-terminated string to be drawn.
xX-coordinate of the text position.
yY-coordinate of the text position.
drawModeDrawing mode to be applied.

Variable Documentation

◆ depixel

const BitMap depixel[]
extern

Predefined bitmap representations of glyphs.

This array contains bitmap structures for rendering font characters in a larger size.

◆ glyphs

const u32 glyphs[128][4]
extern

Glyph data for ASCII characters 0-127.

This array stores 4x32-bit values per character, representing bitmap data for rendering small font glyphs.