LF OS
Hobby operating system for amd64 with high ambitions
Loading...
Searching...
No Matches
font-compile.c File Reference

(475a4fe LLVM update: finally on 18.x!)

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
+ Include dependency graph for font-compile.c:

Go to the source code of this file.

Data Structures

struct  bbox
 
struct  glyph
 
struct  font
 

Functions

void parse_bbox (struct bbox *bbox, char *line, char **toksave)
 
void dump_font_as_c_code (struct font *font, FILE *stream)
 
int main (int argc, char *argv[])
 

Data Structure Documentation

◆ bbox

struct bbox

Definition at line 10 of file font.h.

+ Collaboration diagram for bbox:
Data Fields
int height
int lower_left_x
int lower_left_y
int width

◆ glyph

struct glyph

Definition at line 4 of file font.h.

+ Collaboration diagram for glyph:
Data Fields
uint64_t * bitmap
uint32_t encoding
char * name

◆ font

struct font

Definition at line 14 of file font.h.

+ Collaboration diagram for font:
Data Fields
struct bbox bbox
struct glyph * glyphs
char * name
size_t num_glyphs

Function Documentation

◆ dump_font_as_c_code()

void dump_font_as_c_code ( struct font font,
FILE *  stream 
)

Definition at line 38 of file font-compile.c.

References font::bbox, glyph::bitmap, glyph::encoding, font::glyphs, bbox::height, bbox::lower_left_x, bbox::lower_left_y, glyph::name, font::name, font::num_glyphs, and bbox::width.

+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 66 of file font-compile.c.

References font::bbox, glyph::bitmap, bitmap_size(), dump_font_as_c_code(), encoding, glyph::encoding, entry, font::glyphs, bbox::height, malloc(), glyph::name, font::name, font::num_glyphs, parse_bbox(), and strcmp().

+ Here is the call graph for this function:

◆ parse_bbox()

void parse_bbox ( struct bbox bbox,
char *  line,
char **  toksave 
)

Definition at line 26 of file font-compile.c.

References height, bbox::height, bbox::lower_left_x, bbox::lower_left_y, width, and bbox::width.

+ Here is the caller graph for this function: