axle OS
x86_32 UNIX-like hobby OS
font.h
1 #ifndef FONT_H
2 #define FONT_H
3 
4 #include <std/common.h>
5 #include <gfx/lib/color.h>
6 #include <gfx/lib/view.h>
7 
8 #define CHAR_WIDTH 8
9 #define CHAR_HEIGHT 8
10 #define CHAR_PADDING_W 0
11 #define CHAR_PADDING_H 6
12 
13 //write an ASCII character to a ca_layer with given origin and color
14 void draw_char(ca_layer* layer, char ch, int x, int y, Color color, Size font_size);
15 //write the string pointed to by str to ca_layer starting at given origin
16 //draw_string natively provides hyphen and hyperlink formatting support
17 void draw_string(ca_layer* dest, char* str, Point origin, Color color, Size font_size);
18 
19 Size font_padding_for_size(Size s);
20 
21 #endif
Definition: color.h:7
Definition: size.h:4
Definition: point.h:4