Memsubfont*
getmemdefont(void)
{
char *hdr, *p;
int n;
Fontchar *fc;
Memsubfont *f;
int ld;
Rectangle r;
Memdata *md;
Memimage *i;
/*
* make sure data is word-aligned. this is true with Plan 9 compilers
* but not in general. the byte order is right because the data is
* declared as char*, not ulong*.
*/
p = (char*)defontdata;
n = (uintptr)p & 3;
if(n != 0){
memmove(p+(4-n), p, sizeofdefont-n);
p += 4-n;
}
ld = atoi(p+0*12);
r.min.x = atoi(p+1*12);
r.min.y = atoi(p+2*12);
r.max.x = atoi(p+3*12);
r.max.y = atoi(p+4*12);