2 * Copyright © 2016 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
17 #include "ao_draw_int.h"
20 const struct ao_font ao_font = {
22 .height = GLYPH_HEIGHT,
23 .ascent = GLYPH_ASCENT,
24 .descent = GLYPH_HEIGHT - GLYPH_ASCENT,
28 ao_text(const struct ao_bitmap *dst,
35 uint32_t src[GLYPH_HEIGHT];
39 struct ao_bitmap src_bitmap = {
43 .height = GLYPH_HEIGHT
48 rop = (rop & 3) | 0x4;
53 while ((c = *string++)) {
54 const uint8_t *bytes = &glyph_bytes[glyph_pos[(uint8_t) c]];
56 for (h = 0; h < GLYPH_HEIGHT; h++)
60 x, y, GLYPH_WIDTH, GLYPH_HEIGHT,