mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 00:54:18 +08:00
tune code for size_request of LOGFONT
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user