goome docs

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);
using var logo = Bitmap.Load("logo.png");
c.DrawBitmap(logo, 20, 20, 110, 110, 22);
logo = goome.Bitmap.load("logo.png")
c.bitmap(logo, 20, 20, 110, 110, radius=22)
logo.close()
try (Bitmap logo = Bitmap.load("logo.png")) {
    c.bitmap(logo, 20, 20, 110, 110, 22, 0xFFFFFFFF);
}

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);
using var f = Font.System()!;
c.DrawText(f, 28, 20, 150, "system font, 28 px", 0xFFFFFFFF);
double w = f.Measure(16, "how wide is this");
f = goome.Font.system()
c.font_text(f, 28, 20, 150, "system font, 28 px", 0xFFFFFFFF)
w, h = f.measure("how wide is this", 16)
try (Font f = Font.system(null)) {
    c.text(f, 28, 20, 150, "system font, 28 px", 0xFFFFFFFF);
    double w = f.width("how wide is this", 16);
}

The rasterizer is integer only, same pixels on every machine.