Lines Matching defs:vf
85 vtfont_lookup(const struct vt_font *vf, term_char_t c)
108 dst = vtfont_bisearch(vf->vf_map[bold_map],
109 vf->vf_map_count[bold_map], src);
113 dst = vtfont_bisearch(vf->vf_map[normal_map],
114 vf->vf_map_count[normal_map], src);
117 stride = howmany(vf->vf_width, 8) * vf->vf_height;
118 return (&vf->vf_bytes[dst * stride]);
122 vtfont_ref(struct vt_font *vf)
125 refcount_acquire(&vf->vf_refcount);
126 return (vf);
130 vtfont_unref(struct vt_font *vf)
134 if (refcount_release(&vf->vf_refcount)) {
136 free(vf->vf_map[i], M_VTFONT);
137 free(vf->vf_bytes, M_VTFONT);
138 free(vf, M_VTFONT);
168 struct vt_font *vf;
193 vf = malloc(sizeof *vf, M_VTFONT, M_WAITOK | M_ZERO);
194 vf->vf_bytes = malloc(glyphsize, M_VTFONT, M_WAITOK);
195 vf->vf_height = f->height;
196 vf->vf_width = f->width;
197 vf->vf_refcount = 1;
201 vf->vf_map_count[i] = f->map_count[i];
205 vf->vf_map[i] = malloc(mapsize, M_VTFONT, M_WAITOK);
206 error = copyin(f->map[i], vf->vf_map[i], mapsize);
209 error = vtfont_validate_map(vf->vf_map[i], vf->vf_map_count[i],
216 error = copyin(f->glyphs, vf->vf_bytes, glyphsize);
221 *ret = vf;
224 bad: vtfont_unref(vf);