tune code for size_request of LOGFONT

This commit is contained in:
Vincent Wei
2019-03-03 19:14:18 +08:00
parent 3a9274e9a0
commit bee1bc87c4
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -607,8 +607,9 @@ char_bitmap_pixmap (LOGFONT* logfont, DEVFONT* devfont,
buffer = get_raster_bitmap_buffer(source->rows * source->pitch);
memcpy(buffer, source->buffer, source->rows * source->pitch);
if (sz) {
/* VincentWei: override the bbox.w and bbox.h with bitmap */
/* VincentWei: override the bbox.w and bbox.h with bitmap */
if (sz && (source->rows != sz->cy || source->width != sz->cx)) {
_ERR_PRINTF("FreeType2: BITMAP size does not match BBOX\n");
sz->cx = source->width;
sz->cy = source->rows;
}
+1 -1
View File
@@ -137,13 +137,13 @@ static PLOGFONT gdiCreateLogFont (const char* type, const char* family,
if (newlf->type == NULL || newlf->family == NULL || newlf->charset == NULL)
goto error;
newlf->size_request = size;
if (size > FONT_MAX_SIZE)
newlf->size = FONT_MAX_SIZE;
else if (size < FONT_MIN_SIZE)
newlf->size = FONT_MIN_SIZE;
else
newlf->size = size;
newlf->size_request = newlf->size;
newlf->rotation = rotation;