Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#ifndef AC_FONT_H#define AC_FONT_H
#include "graph.h"
// Simple 8x8 embedded bitmap font#define FONT_CHAR_W 8#define FONT_CHAR_H 8
// 6x10 fixed-width font metrics#define FONT_6X10_CHAR_W 6#define FONT_6X10_CHAR_H 10
// GNU unifont metrics (8x16 cell, fixed 8px advance in our subset)#define FONT_UNIFONT_W 8#define FONT_UNIFONT_H 16
// Font IDs#define FONT_8X8 0#define FONT_MATRIX 1#define FONT_6X10 2#define FONT_UNIFONT 3
// Initialize the built-in fontvoid font_init(void);
// Draw text at position using current ink color// Returns the x position after the last character (for chaining)int font_draw(ACGraph *g, const char *text, int x, int y, int scale);
// Draw text using MatrixChunky8 BDF font// Returns x position after last characterint font_draw_matrix(ACGraph *g, const char *text, int x, int y, int scale);
// Measure text width in pixelsint font_measure(const char *text, int scale);
// Measure text width using MatrixChunky8 fontint font_measure_matrix(const char *text, int scale);
// Draw text using 6x10 fixed-width BDF font (standard AC write font)int font_draw_6x10(ACGraph *g, const char *text, int x, int y, int scale);
// Measure text width using 6x10 fontint font_measure_6x10(const char *text, int scale);
// Draw text using GNU unifont (8x16; ASCII + Latin-1/Ext-A + Cyrillic + Greek)int font_draw_unifont(ACGraph *g, const char *text, int x, int y, int scale);
// Measure text width using unifontint font_measure_unifont(const char *text, int scale);
#endif