goome

Images and fonts

bitmaps with rounded corners and a tint, then a system font and the built in ones

Loading images

goome_bitmap logo;
if (goome_bitmap_load("logo.png", &logo) != GOOME_OK)
    fprintf(stderr, "cant load it: %s\n", goome_bitmap_error());
goome_draw_bitmap(c, &logo, 20, 20, 110, 110, goome_radius(22), 0xFFFFFFFF);
goome_bitmap_free(&logo);

Reads PNG (any color type and bit depth, palettes, interlaced), baseline and progressive JPEG, BMP, PPM and QOI. Goes by whats in the file, the extension doesnt matter. Reads are bounds checked, max 16384x16384.

Bitmaps are yours to free. Load once, not every frame.

Fonts

goome_font *f = goome_font_system(NULL);
goome_text(c, f, 28, 20, 150, "system font, 28 px", 0xFFFFFFFF);
double w = goome_text_measure(f, 16, "how wide is this", NULL);
goome_font_free(f);

The rasterizer is integer only, so the pixels are meant to be the same everywhere. The unit tests hash the output and run on Linux, Windows and both Macs in CI.

Edit this page on GitHub