5903 int error, glyph_index,
i;
5908 ULONG TextTop, previous, BackgroundLeft;
5910 RECTL DestRect, MaskRect;
5911 POINTL SourcePoint, BrushOrigin;
5926 LONG fixAscender, fixDescender;
5929 BOOL EmuBold, EmuItalic;
5957 if (!
dc->dclevel.pSurface)
5964 pdcattr =
dc->pdcattr;
5982 YStart =
Start.y +
dc->ptlDCOrig.y;
5998 DestRect.
left +=
dc->ptlDCOrig.x;
5999 DestRect.
top +=
dc->ptlDCOrig.y;
6000 DestRect.
right +=
dc->ptlDCOrig.x;
6001 DestRect.
bottom +=
dc->ptlDCOrig.y;
6013 psurf =
dc->dclevel.pSurface;
6023 &
dc->eboBackground.BrushObject,
6041 if (TextObj ==
NULL)
6047 FontObj = TextObj->
Font;
6085 fixAscender = FontGDI->
tmAscent << 6;
6092 #define VALIGN_MASK (TA_TOP | TA_BASELINE | TA_BOTTOM) 6096 yoff = -(fixDescender >> 6);
6098 yoff = fixAscender >> 6;
6107 DxShift = (fuOptions &
ETO_PDY) ? 1 : 0;
6121 TextWidth =
Count < 2 ? 0 : (Dx[(
Count-2)<<DxShift] << 6);
6133 if (EmuBold || EmuItalic)
6137 RenderMode, pmxWorldToDevice);
6146 DPRINT1(
"WARNING: Failed to load and render glyph! [index: %d]\n", glyph_index);
6149 glyph =
face->glyph;
6150 if (EmuBold || EmuItalic)
6169 DPRINT1(
"Failed to render glyph! [index: %d]\n", glyph_index);
6177 if (use_kerning && previous && glyph_index)
6181 TextWidth += delta.
x;
6186 if (EmuBold || EmuItalic)
6192 previous = glyph_index;
6200 RealXStart -= TextWidth / 2;
6204 RealXStart -= TextWidth;
6208 psurf =
dc->dclevel.pSurface;
6217 if (!
face->units_per_EM)
6223 thickness =
face->underline_thickness *
6224 face->size->metrics.y_ppem /
face->units_per_EM;
6232 TextLeft = RealXStart;
6234 BackgroundLeft = (RealXStart + 32) >> 6;
6245 DPRINT1(
"Failed to load and render glyph! [index: %d]\n", glyph_index);
6251 glyph =
face->glyph;
6259 DPRINT1(
"Failed to render glyph! [index: %d]\n", glyph_index);
6266 if (use_kerning && previous && glyph_index &&
NULL == Dx)
6270 TextLeft += delta.
x;
6272 DPRINT(
"TextLeft: %I64d\n", TextLeft);
6273 DPRINT(
"TextTop: %lu\n", TextTop);
6276 DestRect.
left = BackgroundLeft;
6278 DestRect.
top = TextTop + yoff - ((fixAscender + 32) >> 6);
6279 DestRect.
bottom = DestRect.
top + ((fixAscender + fixDescender) >> 6);
6294 &
dc->eboBackground.BrushObject,
6298 BackgroundLeft = DestRect.
right;
6300 DestRect.
left = ((TextLeft + 32) >> 6) + realglyph->
left;
6302 DestRect.
top = TextTop + yoff - realglyph->
top;
6313 DPRINT(
"New TextLeft: %I64d\n", TextLeft);
6325 DPRINT(
"New TextLeft2: %I64d\n", TextLeft);
6330 TextTop -= Dx[2 *
i + 1] << 6;
6333 previous = glyph_index;
6335 if (EmuBold || EmuItalic)
6352 TextLeft = RealXStart;
6354 BackgroundLeft = (RealXStart + 32) >> 6;
6359 if (EmuBold || EmuItalic)
6363 RenderMode, pmxWorldToDevice);
6372 DPRINT1(
"Failed to load and render glyph! [index: %d]\n", glyph_index);
6377 glyph =
face->glyph;
6378 if (EmuBold || EmuItalic)
6397 DPRINT1(
"Failed to render glyph! [index: %d]\n", glyph_index);
6404 if (use_kerning && previous && glyph_index &&
NULL == Dx)
6408 TextLeft += delta.
x;
6410 DPRINT(
"TextLeft: %I64d\n", TextLeft);
6411 DPRINT(
"TextTop: %lu\n", TextTop);
6416 DestRect.
left = BackgroundLeft;
6418 DestRect.
top = TextTop + yoff - ((fixAscender + 32) >> 6);
6419 DestRect.
bottom = DestRect.
top + ((fixAscender + fixDescender) >> 6);
6437 &
dc->eboBackground.BrushObject,
6444 BackgroundLeft = DestRect.
right;
6447 DestRect.
left = ((TextLeft + 32) >> 6) + realglyph->
left;
6449 DestRect.
top = TextTop + yoff - realglyph->
top;
6458 if ((bitSize.
cx != 0) && (bitSize.
cy != 0))
6468 if ( !HSourceGlyph )
6470 DPRINT1(
"WARNING: EngCreateBitmap() failed!\n");
6476 if ( !SourceGlyphSurf )
6479 DPRINT1(
"WARNING: EngLockSurface() failed!\n");
6514 &
dc->eboText.BrushObject,
6517 DPRINT1(
"Failed to MaskBlt a glyph!\n");
6535 if (!
face->units_per_EM)
6541 position =
face->underline_position *
6542 face->size->metrics.y_ppem /
face->units_per_EM;
6544 for (
i = -thickness / 2;
i < -thickness / 2 + thickness; ++
i)
6548 &
dc->eboText.BrushObject,
6550 TextTop + yoff - position +
i,
6552 TextTop + yoff - position +
i,
6560 for (
i = -thickness / 2;
i < -thickness / 2 + thickness; ++
i)
6564 &
dc->eboText.BrushObject,
6566 TextTop + yoff - (fixAscender >> 6) / 3 +
i,
6568 TextTop + yoff - (fixAscender >> 6) / 3 +
i,
6577 DPRINT(
"New TextLeft: %I64d\n", TextLeft);
6589 DPRINT(
"New TextLeft2: %I64d\n", TextLeft);
6594 TextTop -= Dx[2 *
i + 1] << 6;
6597 previous = glyph_index;
6599 if (EmuBold || EmuItalic)
6619 if (TextObj !=
NULL)
#define ROP2_TO_MIX(Rop2)
#define ERROR_INVALID_PARAMETER
FT_Get_Kerning(FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning)
ENGAPI BOOL APIENTRY EngLineTo(_Inout_ SURFOBJ *pso, _In_ CLIPOBJ *pco, _In_ BRUSHOBJ *pbo, _In_ LONG x1, _In_ LONG y1, _In_ LONG x2, _In_ LONG y2, _In_opt_ RECTL *prclBounds, _In_ MIX mix)
_In_ int _Inout_ LPRECT lprc
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
VOID FASTCALL DC_vUpdateBackgroundBrush(PDC pdc)
#define FLOATOBJ_Equal0(pf)
#define FLOATOBJ_Set1(fo)
enum FT_Render_Mode_ FT_Render_Mode
struct _PALETTE *const ppal
FORCEINLINE VOID TEXTOBJ_UnlockText(PLFONT plfnt)
_Requires_lock_held_ ppdev BOOL NTAPI MouseSafetyOnDrawEnd(_Inout_ PPDEVOBJ ppdev)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
#define FT_HAS_KERNING(face)
FT_BitmapGlyph APIENTRY ftGdiGlyphSet(FT_Face Face, FT_GlyphSlot GlyphSlot, FT_Render_Mode RenderMode)
VOID NTAPI EXLATEOBJ_vInitialize(_Out_ PEXLATEOBJ pexlo, _In_opt_ PALETTE *ppalSrc, _In_opt_ PALETTE *ppalDst, _In_ COLORREF crSrcBackColor, _In_ COLORREF crDstBackColor, _In_ COLORREF crDstForeColor)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
BOOL FASTCALL TextIntUpdateSize(PDC dc, PTEXTOBJ TextObj, PFONTGDI FontGDI, BOOL bDoLock)
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
FT_BEGIN_HEADER FT_GlyphSlot_Embolden(FT_GlyphSlot slot)
FT_GlyphSlot_Oblique(FT_GlyphSlot slot)
_Requires_lock_held_ ppdev BOOL NTAPI MouseSafetyOnDrawStart(_Inout_ PPDEVOBJ ppdev, _In_ LONG HazardX1, _In_ LONG HazardY1, _In_ LONG HazardX2, _In_ LONG HazardY2)
VOID NTAPI EXLATEOBJ_vCleanup(_Inout_ PEXLATEOBJ pexlo)
static LONG ScaleLong(LONG lValue, PFLOATOBJ pef)
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
#define gmxWorldToDeviceDefault
#define FLOATOBJ_MulLong(pf, l)
#define PATH_IsPathOpen(dclevel)
VOID FASTCALL DC_vUpdateTextBrush(PDC pdc)
#define IntUnLockFreeType()
ENGAPI SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
VOID FtSetCoordinateTransform(FT_Face face, PMATRIX pmx)
BOOL FASTCALL IntIsFontRenderingEnabled(VOID)
BOOL APIENTRY IntEngMaskBlt(_Inout_ SURFOBJ *psoDest, _In_ SURFOBJ *psoMask, _In_ CLIPOBJ *pco, _In_ XLATEOBJ *pxloDest, _In_ XLATEOBJ *pxloSource, _In_ RECTL *prclDest, _In_ POINTL *pptlMask, _In_ BRUSHOBJ *pbo, _In_ POINTL *pptlBrushOrg)
#define IntLockFreeType()
static FT_UInt FASTCALL get_glyph_index_flagged(FT_Face face, FT_ULong code, DWORD indexed_flag, DWORD flags)
static const WCHAR Cleanup[]
LONG APIENTRY FLOATOBJ_GetLong(FLOATOBJ *pf)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
FT_BitmapGlyph APIENTRY ftGdiGlyphCacheSet(FT_Face Face, INT GlyphIndex, INT Height, PMATRIX pmx, FT_GlyphSlot GlyphSlot, FT_Render_Mode RenderMode)
PTEXTOBJ FASTCALL RealizeFontInit(HFONT hFont)
BOOL FASTCALL PATH_ExtTextOut(PDC dc, INT x, INT y, UINT flags, const RECTL *lprc, LPCWSTR str, UINT count, const INT *dx)
FT_BitmapGlyph APIENTRY ftGdiGlyphCacheGet(FT_Face Face, INT GlyphIndex, INT Height, FT_Render_Mode RenderMode, PMATRIX pmx)
ENGAPI VOID APIENTRY EngUnlockSurface(_In_ _Post_ptr_invalid_ SURFOBJ *pso)
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
VOID FASTCALL IntUpdateBoundsRect(PDC, PRECTL)
FT_Render_Mode FASTCALL IntGetFontRenderMode(LOGFONTW *logfont)
#define ObjToGDI(ClipObj, Type)
FORCEINLINE PMATRIX DC_pmxWorldToDevice(PDC pdc)
#define EMUBOLD_NEEDED(original, request)
#define FT_LOAD_NO_BITMAP
ENUMLOGFONTEXW elfEnumLogfontEx
FT_Done_Glyph(FT_Glyph glyph)
#define ROP4_FROM_INDEX(index)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
GLenum GLuint GLint GLenum face
ENGAPI HBITMAP APIENTRY EngCreateBitmap(_In_ SIZEL sizl, _In_ LONG lWidth, _In_ ULONG iFormat, _In_ FLONG fl, _In_opt_ PVOID pvBits)
BOOL APIENTRY IntEngBitBlt(SURFOBJ *psoTrg, SURFOBJ *psoSrc, SURFOBJ *psoMask, CLIPOBJ *pco, XLATEOBJ *pxlo, RECTL *prclTrg, POINTL *pptlSrc, POINTL *pptlMask, BRUSHOBJ *pbo, POINTL *pptlBrush, ROP4 Rop4)
static BOOLEAN IntLPtoDP(DC *pdc, PPOINTL ppt, UINT count)