Anonymous user
Scalable Screen Font: Difference between revisions
Jump to navigation
Jump to search
m
no edit summary
[unchecked revision] | [unchecked revision] |
mNo edit summary |
|||
Line 30:
ssfn_dst.y = 200;
/* render
ssfn_putc(
ssfn_putc('e');
ssfn_putc('l');
ssfn_putc('l');
ssfn_putc('o');
</source>
Line 70 ⟶ 74:
buf.fg = 0xFF808080; /* foreground color */
/* rasterize the first glyph in an UTF-8 string into a 32 bit packed pixel buffer. Returns how many bytes were consumed from the string */
ssfn_render(&ctx, &buf, "
ssfn_render(&ctx, &buf, "ello");
ssfn_render(&ctx, &buf, "llo"); /* assuming there's a ligature for "ll" in the font */
ssfn_render(&ctx, &buf, "o");
/* free resources */
|