src/fontcache.cpp
changeset 7348 becce3f57dc7
parent 6885 7d96edaa2d9b
child 7352 e2e8432018f6
equal deleted inserted replaced
7347:7a77358b0537 7348:becce3f57dc7
   397 	width  = max(1, slot->bitmap.width + (size == FS_NORMAL));
   397 	width  = max(1, slot->bitmap.width + (size == FS_NORMAL));
   398 	height = max(1, slot->bitmap.rows  + (size == FS_NORMAL));
   398 	height = max(1, slot->bitmap.rows  + (size == FS_NORMAL));
   399 
   399 
   400 	/* FreeType has rendered the glyph, now we allocate a sprite and copy the image into it */
   400 	/* FreeType has rendered the glyph, now we allocate a sprite and copy the image into it */
   401 	sprite = (Sprite*)calloc(width * height + 8, 1);
   401 	sprite = (Sprite*)calloc(width * height + 8, 1);
   402 	sprite->info   = 1;
       
   403 	sprite->width  = width;
   402 	sprite->width  = width;
   404 	sprite->height = height;
   403 	sprite->height = height;
   405 	sprite->x_offs = slot->bitmap_left;
   404 	sprite->x_offs = slot->bitmap_left;
   406 	// XXX 2 should be determined somehow... it's right for the normal face
   405 	// XXX 2 should be determined somehow... it's right for the normal face
   407 	y_adj = (size == FS_NORMAL) ? 2 : 0;
   406 	y_adj = (size == FS_NORMAL) ? 2 : 0;