From 209a9cd69ad1ae66e94515e937bdaee42192b34f Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Fri, 31 May 2019 17:36:29 +0800 Subject: [PATCH] remove checking of output rectangle for DrawTextEx2 --- src/newgdi/drawtext.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/newgdi/drawtext.c b/src/newgdi/drawtext.c index fb68a8d0..e54ab800 100644 --- a/src/newgdi/drawtext.c +++ b/src/newgdi/drawtext.c @@ -233,12 +233,14 @@ int DrawTextEx2 (HDC hdc, const char* pText, int nCount, coor_LP2SP(pdc, &rcDraw.right, &rcDraw.bottom); NormalizeRect (&rcDraw); - /* If output rect is too small, we shouldn't output any text.*/ +#if 0 + /* If output rect is zero, we shouldn't output any text.*/ if (RECTW(rcDraw) < pdc->pLogFont->size - && RECTH(rcDraw) < pdc->pLogFont->size) { + && RECTH(rcDraw) < pdc->pLogFont->size) { _WRN_PRINTF ("Output rect is too small, we won't output any text."); return -1; } +#endif /* nFormat surpport follow. */ if ((nFormat & DT_CALCRECT) || firstline){