update deprecations for c3 0.7.9

This commit is contained in:
Alessandro Mauri 2026-03-11 17:37:07 +01:00
parent 4f7fa7d50c
commit d2a5e4739b
8 changed files with 28 additions and 28 deletions

View file

@ -90,7 +90,7 @@ fn void? Font.load(&font, Allocator allocator, String name, ZString path, uint h
font.sft.font = schrift::loadfile(path);
if (font.sft.font == null) {
font.table.free();
return TTF_LOAD_FAILED?;
return TTF_LOAD_FAILED~;
}
schrift::SftLMetrics lmetrics;
@ -122,7 +122,7 @@ fn Glyph*? Font.get_glyph(&font, Codepoint code)
if (catch excuse = gp) {
if (excuse != NOT_FOUND) {
return excuse?;
return excuse~;
}
} else {
return gp;
@ -136,11 +136,11 @@ fn Glyph*? Font.get_glyph(&font, Codepoint code)
schrift::SftGMetrics gmtx;
if (schrift::lookup(&font.sft, (SftUChar)code, &gid) < 0) {
return MISSING_GLYPH?;
return MISSING_GLYPH~;
}
if (schrift::gmetrics(&font.sft, gid, &gmtx) < 0) {
return BAD_GLYPH_METRICS?;
return BAD_GLYPH_METRICS~;
}
schrift::SftImage img = {
@ -150,7 +150,7 @@ fn Glyph*? Font.get_glyph(&font, Codepoint code)
char[] pixels = mem::new_array(char, (usz)img.width * img.height);
img.pixels = pixels;
if (schrift::render(&font.sft, gid, img) < 0) {
return RENDER_ERROR?;
return RENDER_ERROR~;
}
glyph.code = code;
@ -217,7 +217,7 @@ fn Atlas*? Ctx.get_font_atlas(&ctx, String name)
{
// TODO: use the font name, for now there is only one font
if (name.hash() != ctx.font.id) {
return WRONG_ID?;
return WRONG_ID~;
}
return &ctx.font.atlas;