Lines Matching refs:gl
112 add_mapping(struct glyph *gl, unsigned int c, unsigned int map_idx)
121 mp->m_glyph = gl;
173 struct glyph *gl;
181 SLIST_FOREACH(gl, &glyph_hash[hash], g_hash) {
182 if (memcmp(gl->g_data, bytes, wbytes * height) == 0) {
184 return (gl);
189 gl = xmalloc(sizeof *gl);
190 gl->g_data = xmalloc(wbytes * height);
191 memcpy(gl->g_data, bytes, wbytes * height);
193 TAILQ_INSERT_HEAD(&glyphs[map_idx], gl, g_list);
195 TAILQ_INSERT_TAIL(&glyphs[map_idx], gl, g_list);
196 SLIST_INSERT_HEAD(&glyph_hash[hash], gl, g_hash);
201 return (gl);
207 struct glyph *gl;
212 gl = add_glyph(bytes, 0, 1);
214 gl = add_glyph(bytes, map_idx, 0);
215 if (add_mapping(gl, curchar, map_idx) != 0)
218 gl = add_glyph(bytes_r, map_idx + 1, 0);
219 if (add_mapping(gl, curchar, map_idx + 1) != 0)
524 struct glyph *gl;
528 TAILQ_FOREACH(gl, &glyphs[i], g_list)
529 gl->g_index = idx++;
535 struct glyph *gl;
539 TAILQ_FOREACH(gl, &glyphs[i], g_list)
540 if (fwrite(gl->g_data, wbytes * height, 1, fp) != 1)