Commit Graph

2950 Commits

Author SHA1 Message Date
Jacek Caban 4a32a87537 gdi32: Move background mode to DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 21:09:49 +02:00
Jacek Caban a81d0b97cb gdi32: Use get_dc_attr in SetTextAlign.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 21:09:48 +02:00
Jacek Caban 1ca8064c88 gdi32: Use NtGdiGradientFill for GdiGradientFill implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban 6762f6ac52 gdi32: Use META_EXTFLOODFILL records for ExtFloodFill.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban 0dd6b238aa gdi32: Use NtGdiExtFloodFill for ExtFloodFill implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban 23f6b8b473 gdi32: Use NtGdiInvertRgn for InvertRgn implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban a4a27e5846 gdi32: Use NtGdiFrameRgn for FrameRgn implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban a3a5c7048f gdi32: Use NtGdiFillRgn for PaintRgn implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban d552d7ef68 gdi32: Use NtGdiFillRgn for FillRgn implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban 382d5f769b gdi32: Use ntgdi names for stubs in painting.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban 2753256862 gdi32: Use NtGdiSetPixelFormat for GdiSetPixelFormat implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:24 +02:00
Jacek Caban ccb6fbba76 gdi32: Use ntgdi name for GetPixel.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban e7b9a16bc2 gdi32: Use SetPixel for SetPixelV implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 5a71d8415e gdi32: Use NtGdiSetPixel for SetPixel implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 0bc43b3a92 gdi32: Remove no longer used EMF path driver.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 972cfaca1f gdi32: Use ntgdi interface for path functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 0f3173e7d9 gdi32: Use NtGdiCloseFigure for CloseFigure implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban cc7e7002ef gdi32: Use NtGdiExtTextOutW for ExtTextOutW implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban aca66fb503 gdi32: Store text alignment in DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 607733af0e gdi32: Use NtGdiPolyPolyDraw for CreatePolyPolygonRgn implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 11f09c2d74 gdi32: Use NtGdiPolyDraw for PolyDraw implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Jacek Caban 82d59861a0 gdi32: Use NtGdiPolyPolyDraw for PolyBezierTo implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:21:14 +02:00
Jacek Caban d69a6ab731 gdi32: Use NtGdiPolyPolyDraw for PolylineTo implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:21:09 +02:00
Jacek Caban 5be1b7c75b gdi32: Use NtGdiPolyPolyDraw for PolyBezier implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:20:58 +02:00
Jacek Caban 1f5cc0e5ef gdi32: Remove no longer used Polygon and Polyline driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:20:50 +02:00
Jacek Caban 77a6beb4f1 gdi32: Use NtGdiPolyPolyDraw for Polyline implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:20:29 +02:00
Jacek Caban 62fc320c84 gdi32: Use NtGdiPolyPolyDraw for PolyPolyline implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:20:19 +02:00
Jacek Caban c64bfb5433 gdi32: Use NtGdiPolyPolyDraw for Polygon implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:20:11 +02:00
Jacek Caban 1b7a15e4cc gdi32: Use NtGdiPolyPolyDraw for PolyPolygon implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:19:33 +02:00
Daniel Lehman 323416920f gdi32/tests: Add a test for double-free on repeated calls to Delete[Enh]MetaFile.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:19:29 +02:00
Jacek Caban 808d1818a1 gdi32: Use free_gdi_handle directly for NtGdiDeleteClientObj.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:19:26 +02:00
Jacek Caban 3713901dff gdi32: Use NtGdiAngleArc for AngleArc implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:14:11 +02:00
Jacek Caban 0636b36013 gdi32: Use NtGdiRectangle for Rectangle implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:14:09 +02:00
Jacek Caban ffaf75a082 gdi32: Use NtGdiRoundRect for RoundRect implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:14:07 +02:00
Jacek Caban 680220c565 gdi32: Use NtGdiEllipse for Ellipse implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:14:04 +02:00
Jacek Caban b9f773ded1 gdi32: Handle EMFs directly in arc functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:13:57 +02:00
Jacek Caban b825727d1d gdi32: Store graphics mode in DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:13:54 +02:00
Jacek Caban 4fc7a1df1b gdi32: Handle EMFs directly in MoveToEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:13:50 +02:00
Jacek Caban 531a599405 gdi32: Use DC_ATTR for GetCurrentPositionEx implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:13:47 +02:00
Jacek Caban 340a445289 gdi32: Handle EMFs recording directly in LineTo implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:13:43 +02:00
Jacek Caban 317fe5bcb0 gdi32/tests: Silence noisy traces.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:13:37 +02:00
Jacek Caban 3f779e47ee gdi32: Introduce DC_ATTR struct and use it to store current position.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:32:47 +02:00
Jacek Caban b789992337 gdi32: Handle metafiles directly in Arc implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:32:36 +02:00
Jacek Caban b70616b508 gdi32: Handle metafiles directly in Chord and Pie implementations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:32:10 +02:00
Jacek Caban 95b3504e1e gdi32: Handle metafiles directly in MoveToEx implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:32:05 +02:00
Jacek Caban 68b6cca258 gdi32: Handle metafiles directly in LineTo implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:56 +02:00
Jacek Caban 0c82bba7b5 gdi32: Use NtGdiArcInternal for Pie implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:53 +02:00
Jacek Caban 1bf34b763e gdi32: Use NtGdiArcInternal for Chord implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:51 +02:00
Jacek Caban 2b0cddbf0d gdi32: Use NtGdiArcInternal for ArcTo implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:48 +02:00
Jacek Caban c16bf295cc gdi32: Use NtGdiArcInternal for Arc implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:24 +02:00
Jacek Caban af039dc5ab gdi32: Introduce NtGdiMoveTo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:21 +02:00
Jacek Caban c1f63c0894 gdi32: Introduce NtGdiLineTo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:31:16 +02:00
Jactry Zeng aee7d560ae gdi32: Fix a typo in unix_face_create().
This also fixes test failures in test_lang_names() when on Japanese system.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51382
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:18:50 +02:00
Jacek Caban e33bdb8749 gdi32: Use NtGdiCreateClientObj for enhmetafile objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 22:15:30 +02:00
Jacek Caban 3d8a8fc132 gdi32: Use NtGdiCreateClientObj for metafile objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 22:15:30 +02:00
Jacek Caban b0240461f1 gdi32: Rename gdi_private.h to ntgdi_private.h.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 22:15:30 +02:00
Jacek Caban 06afb958d4 gdi32: Store ntgdi object types in handle table.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:12:52 +02:00
Jacek Caban c56cf0131b gdi32/test: Add more handle table tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:12:43 +02:00
Jacek Caban 4b1094099c gdi32/tests: Remove workarounds for old Windows versions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:12:35 +02:00
Jacek Caban b2e70ed03a gdi32: Move region helper functions to objects.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:58:05 +02:00
Jacek Caban 0a42d6a915 gdi32: Use ntgdi names for region functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:58:02 +02:00
Jacek Caban 8df14dac7a gdi32: Use ntgdi names for region constructors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:57:58 +02:00
Jacek Caban 94876d81ce gdi32: Introduce NtGdiExtCreateRegion.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:57:53 +02:00
Jacek Caban 18e9da8a8d gdi32: Introduce NtGdiDeleteObjectApp.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 17:57:50 +02:00
Jacek Caban 0204ebbc67 gdi32: Move CreateDiscardableBitmap implementation to objects.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:50 +02:00
Jacek Caban 6b3c811c76 gdi32: Use ntgdi names for bitmap functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:45 +02:00
Jacek Caban 270f7bed60 gdi32: Introduce NtGdiCreateBitmap.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:34 +02:00
Jacek Caban 505a6b9cff gdi32: Implement CreateBitmapIndirect on top of CreateBitmap.
Instead of the other way around.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:29 +02:00
Jacek Caban f5c117fb78 gdi32: Introduce NtGdiCreatePen.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:23 +02:00
Jacek Caban 4590f6fb4f gdi32: Implement CreatePenIndirect on top of CreatePen.
Instead of the other way around.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:17 +02:00
Jacek Caban 3dcb5db47f gdi32: Reimplement GetObjectA on top of GetObjectW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:39:08 +02:00
Jacek Caban 14a39fcfe7 gdi32: Introduce NtGdiExtGetObjectW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:38:55 +02:00
Jacek Caban be6295abb0 gdi32/tests: Add more SelectObject tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:53:50 +02:00
Jacek Caban dc73184c29 gdi32: Directly use ntgdi interface to select objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:53:50 +02:00
Jacek Caban 7c957ec998 gdi32: Use get_object_type for GetObjectType implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:53:50 +02:00
Jacek Caban 341be5f3f2 gdi32: Reimplement SelectObject on top of ntgdi interface.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:53:50 +02:00
Jacek Caban aeb8c22f76 gdi32: Introduce NtGdiSelectFont.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:49:09 +02:00
Jacek Caban 966663a1d2 gdi32: Introduce NtGdiSelectBrush.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:49:09 +02:00
Jacek Caban 30550d2e6d gdi32: Introduce NtGdiSelectBitmap.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:49:09 +02:00
Jacek Caban 4dd693a7ea gdi32: Introduce NtGdiSelectPen.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 16:49:09 +02:00
Jacek Caban e82332f2b2 gdi32: Initialize GdiSharedHandleTable in PEB.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Jacek Caban 7f819ea4e9 gdi32: Use handle layout compatible with GdiSharedHandleTable to store handles.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Jacek Caban d02eb26413 gdi32: Move more fields from gdi_handle_entry to gdi_obj_header.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Jacek Caban a96fcf21b0 gdi32: Introduce gdi_obj_header and use it to store gdi_obj_funcs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Jacek Caban c359b4a0e9 gdi32: Delay writing to enhanced metafile file until CreateEnhMetaFile is called.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Jacek Caban 80aed7cae6 gdi32: Remove no longer used disk-based metafile special-cases.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Jacek Caban 0c9bc0ed6b gdi32: Delay writing metafile file until CloseMetaFile is called.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Jacek Caban d19ac108f9 gdi32/tests: Add metafile file creation tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Zhiyi Zhang 04b4d0f380 gdi32: Partially implement HALFTONE stretch mode.
COLORONCOLOR(STRETCH_DELETESCANS) was used in place of HALFTONE. COLORONCOLOR mode may delete rows
of pixels without trying to preserve information so it will cause Wine to render poorly when the
destination rectangle is small.

According to tests, HALFTONE mode uses box filter when doing integer downscaling and nearest
neighbor interpolation when doing upscaling in both horizontally and vertically. In other cases,
HALFTONE mode uses a lanczos3 like algorithm to interpolate pixels. There are also other heuristics
involved. For example, shrinking a 2x2 image to 1x1 may not use box filter depending on image data.
Since this algorithm is undocumented, it's difficult to reverse engineer the original algorithm and
produce identical results. Instead, this patch uses a naive implementation of bilinear interpolation
to implement HALFTONE mode and it produces good quality images.

For 8-bit and lower color depth images, nulldrv_StretchBlt should resize the images first and then
converts color depth.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46375
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:43:55 +02:00
Jacek Caban ce94c78b2e gdi32: Fix SetPixel error return value.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 10:05:10 +02:00
Francois Gouget ed98e3b51b gdi32/tests: Use a winetest context for test_font_metrics().
test_font_metrics() is called from many places and it is important to
know where it was called from to diagnose failures.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 23:04:03 +02:00
Francois Gouget a82ab29308 gdi32/tests: Add a context to the testJustification() failure message.
It is called in three places so this allows identifying which one
failed.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 22:30:45 +02:00
Zhiyi Zhang b6820ad68d gdi32: Add more emf StretchBlt tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:32:03 +02:00
Zhiyi Zhang dadc6fd29b gdi32: Use a common helper for emf StretchBlt and AlphaBlend.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:32:00 +02:00
Zhiyi Zhang 683fdec3a8 gdi32: Implement MFDRV_SetLayout().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:31:57 +02:00
Zhiyi Zhang d171d11167 gdi32: Return correct color depth for display DCs in GetDeviceCaps().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29184
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:31:54 +02:00
Dmitry Timoshkov d8e6d2e3d1 gdi32/tests: Test otmEMSquare only for Truetype fonts.
It looks like GetOutlineTextMetrics no longer fails for bitmat fonts
under Windows 10.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51184
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:31:50 +02:00
Alistair Leslie-Hughes 7763efa347 gdi32: Don't override FontSubstitutes on a DPI only change.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36010
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:32:51 +02:00
Jiangyi Chen d7b9b306cb gdi32: Delete the external font reg key when face's name matches but the file path does not.
Signed-off-by: Jiangyi Chen <chenjiangyi@uniontech.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 14:10:12 +02:00
Haoyang Chen 4b9c4e4201 gdi32: Fix a memory leak.
Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:55 +02:00
Zhiyi Zhang 3ba4412be6 gdi32: Fix typos for GET_DC_PHYSDEV.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 23:32:38 +02:00
Nikolay Sivov 8241d21ae0 gdi32: Enumerate scalable fonts with zero charset mask as OEM.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51041
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 23:19:53 +02:00
Alexandre Julliard f2068ec438 gdi32: Don't bother computing the gamma ramp when not used.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 09:56:08 +02:00
Zhiyi Zhang 3ebc715881 gdi32: Reselect font and pen when changing world transforms for enhanced metafiles.
Reselect font and pen into enhanced metafile device contexts after world transform is changed so
that content can be drawn using the correct size. Also modifying the world transform for enhanced
metafiles doesn't generate EMR_SELECTOBJECT records according to winedump outputs.

Fix an issue that Tally may produce a print preview with a too large font or with a black side bar.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Zhiyi Zhang 1543be811d gdi32: Move common SetLayout() code to nulldrv_SetLayout().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Zhiyi Zhang aadf11fb4f gdi32/tests: Test text extents for enhanced metafiles.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Zhiyi Zhang 8ae18d055a gdi32: Implement EMFDRV_AlphaBlend().
Fix a bug that Tally produces a blank print preview when images have to be scaled.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Zhiyi Zhang 0893240da5 gdi32/tests: Test GdiAlphaBlend() for enhanced metafiles.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:09 +02:00
Sven Baars 842b0d7338 gdi32: Fix some leaks on error paths.
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 22:06:55 +02:00
Sven Baars bdfc865014 gdi32: Fix a leak on error path (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 22:06:55 +02:00
Sven Baars 9cd6568062 gdi32: Add a missing break (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 22:06:55 +02:00
Sven Baars 265a32aa12 gdi32: Remove some unreachable code (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 22:06:55 +02:00
Gabriel Ivăncescu 02a94ecc86 gdi32: Use a lazy-init lookup cache when converting RGB values to colour table indices.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Gabriel Ivăncescu d4dc8fd2c2 gdi32: Move the loop through each clipped rectangle to the primitive blend funcs.
This is to prepare so we don't recalculate the lookup cache map for color
tables on every clipped rect (which is expensive).

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Akihiro Sagawa 629ba19200 gdi32: Get rid of redundant ntmCellHeight member.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Akihiro Sagawa 837c4f4b87 gdi32: Fix text metrics used in EnumFonts families.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50818
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Akihiro Sagawa 8f6f1c8f7a gdi32: Move otmEMSquare initialization to freetype_load_font.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Akihiro Sagawa 67093e3b4a gdi32/tests: Remove unreliable height tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Alexandre Julliard 23389127ec gdi32: Try to load the printer driver from the printer driver directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 19:26:09 +02:00
Zhiyi Zhang efdd6f46c9 gdi32: Fix handling of ModifyWorldTransform( MWT_IDENTITY ) on an emf dc.
When the mode parameter is MWT_IDENTITY, the xform parameter can be NULL because it should be
ignored and use the identity matrix.

Fix Tally crashing when exporting a JPEG image.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 19:26:09 +02:00
Byeongsik Jeon 56b16ff466 gdi32: Remove needTransform variable of freetype_get_glyph_outline().
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Byeongsik Jeon bb86ae80c8 gdi32: Remove metrics, vertical_metrics arguments of get_advance_metric().
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Byeongsik Jeon 64ca79529b gdi32: Remove incoming_font argument of get_advance_metric().
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Byeongsik Jeon 062aa9a614 gdi32: Fix typo in get_transformed_bbox() trace message.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Byeongsik Jeon d6e83e3027 gdi32: Move FT_Library_SetLcdFilter() to init_freetype().
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Gabriel Ivăncescu 14a9551a94 gdi32: ExtTextOut should fail if count is larger than INT_MAX.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 21:01:38 +01:00
Alexandre Julliard 9581b2df8c gdi32: Cache the codepage tables also for OpenType names mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 20:55:06 +01:00
Alexandre Julliard 8d373a67e1 gdi32/tests: Regenerate ttf files with the official fontforge version.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 20:43:55 +01:00
Zhiyi Zhang 8fad0b146d gdi32: Report real VREFRESH values for GetDeviceCaps() with display DCs.
Even though MSDN says 0 and 1 are both valid and they represent the default refresh rate of display
hardware. Some games rely on the value being the real refresh rate and use it to cap frame rates.

Fix an issue that Sakuna: Of Rice and Ruin reports monitors of 1Hz and cap to 1fps.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 21:12:06 +01:00
Zhiyi Zhang 2006f76b5f gdi32: Report correct HORZRES and VERTRES values for GetDeviceCaps() with DCs on a specific monitor.
Fix DLC Quest uses the primary monitor size to render when in fullscreen mode on non-primary monitors.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 21:12:01 +01:00
Alexandre Julliard b67f39ccc6 gdi32: Merge rectangles horizontally when possible in CreatePolyPolygonRgn.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50539
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:21 +01:00
Byeongsik Jeon f026739564 gdi32: Preserve the GGO_UNHINTED bits until used.
Fix a regression caused by 044315c0b3.

Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Nikolay Sivov 016eeb5109 gdi32/uniscribe: Get rid of shaping group values in Arabic shaping data table.
It's not used right now, Syriac specific groups will be accomodated
as additional joining types.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:11:40 +01:00
Nikolay Sivov f734d98a98 gdi32/uniscribe: Merge Arabic joining types C and D.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:11:15 +01:00
Dmitry Timoshkov f45606c5f8 gdi32: Avoid best fit chars when mapping unicode character to a glyph index.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:09:48 +01:00
Zebediah Figura 96fdbabc72 gdi32: Do not compare face file names in insert_face_in_family_list() if either is NULL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50486
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 10:09:47 +01:00
Alexandre Julliard 5e648e8967 gdi32: Don't fail font creation when we are out of handles.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50354
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 21:04:55 +01:00
Dmitry Timoshkov 22d776fc1b gdi32/tests: Add some tests to show that GetGlyphIndices() should avoid best fit chars.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 16:55:53 +01:00
Zhiyi Zhang aa3e02e193 gdi32/tests: Fix test failures on Win10 1909+.
Memory DC, metafile DC and enhanced metafile DC support gamma ramp on Win10 1909+.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 16:41:46 +01:00
Zhiyi Zhang d93412ca67 gdi32/tests: Fix possible test failures in test_clip_box().
When there are multiple monitors and their monitor region union can still be represented by a simple
rectangle, the clip box region type for the screen DC is still SIMPLEREGION.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 16:41:43 +01:00
Michael Stefaniuc f6a0c60618 gdi32/tests: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-18 15:21:37 +01:00
Jacek Caban fcf545f449 winapi: Use __alignof__ on clang.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 15:30:07 +01:00
Alexandre Julliard a0559ad5c3 gdi32: Properly fail mapping glyph for invalid characters in fonts without encoding.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50252
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-14 17:02:39 +01:00
Alexandre Julliard 057b4b4148 gdi32: Don't create font substitutes for identical names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-14 17:02:39 +01:00
Rémi Bernon 76c9dbd4fb gdi32: Fix gdi font leak in CreateScalableFontResourceW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50273
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-09 22:09:53 +01:00
Rémi Bernon 06206f1628 gdi32: Don't try to get glyph index when default char is 0.
Fixes a regression from 5bdc6e0fe6, this
is what the code was originally doing.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50175
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 22:25:59 +01:00
Rémi Bernon 6245f07201 gdi32/tests: Test GetGlyphIndices with '\0' default and a glyph.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50175
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 22:25:59 +01:00
Alexandre Julliard 5f70191470 gdi32: Always let the Freetype driver fixup the AA flags.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50127
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-07 22:35:29 +01:00
Rémi Bernon 8aa404bba0 gdi32: Use FreeType as a fallback when loading font faces.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Rémi Bernon 3ea171dee5 gdi32: Try to parse font props without FreeType.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Rémi Bernon 93ef83e903 gdi32: Try to parse font names without FreeType.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Rémi Bernon e338d04697 gdi32: Introduce new opentype font parsing helpers.
Mostly taken from dwrite source, adapted to make it more flexible.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Rémi Bernon dece7fa9eb gdi32: Store ft_face font props on unix_face.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Rémi Bernon dbe4462057 gdi32: Introduce struct unix_face as a ft_face wrapper.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Rémi Bernon 63de94839c gdi32: Only use the registry cache for application fonts.
And load system fonts outside of the global font mutex. We now only use
the mutex to protect the registry fonts initialization.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 12:35:55 +01:00
Rémi Bernon cae74aa7d9 gdi32: Only request registry font path when necessary.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 12:35:47 +01:00
Rémi Bernon a0b7a0da40 gdi32: Update the external keys after all fonts are loaded.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 12:35:42 +01:00
Rémi Bernon 7f4a889078 gdi32: Index scalable faces by full name in rbtree.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 12:35:28 +01:00
Rémi Bernon 3c0137f81e gdi32: Load registry fonts after system fonts.
This fixes an issue when, if an external font path was modified in the
Windows key, it was then not considered as external anymore, but still
present in the external key, and then dropped from both on update.

This now forcefully updates the font path in both keys if needed.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 12:35:10 +01:00
Rémi Bernon c06cacff11 gdi32: Compare font face names using RtlDowncaseUnicodeChar.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:24 +01:00
Rémi Bernon c57a53147f gdi32/tests: Add locale-dependent face matching test.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Francois Gouget c4310f6943 gdi32/tests: Fix the spelling of an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 22:51:35 +01:00
Bernhard Übelacker 79d8ed4849 gdi32: Avoid crash by initializing variable font_set.
If the call pFcStrListNext returns NULL the loop is never entered and
the variable font_set never gets written, leading to a crash cleaning
up font_set by pFcFontSetDestroy.

Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 16:59:26 +01:00
Rémi Bernon f7e646ccb7 gdi32: Lazily create and cache fontconfig patterns.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon a51d68e35c gdi32: Load font list directly from fontconfig cache.
Instead of going through the -slow- font matching.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon d05e2bcaf6 gdi32: Move FreeType face creation to AddFaceToList.
So we can use it to add individual fontconfig fonts without iterating
all faces. And rename it to add_unix_face.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon 37c72ce2d6 gdi32: Ignore Type 1 fonts in fontconfig enumeration.
Instead of loading the font with FreeType to discard it right away.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Michael Stefaniuc 236fa496da gdi32/uniscribe: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 11:25:18 +01:00
Rémi Bernon c475e5b40c gdi32: Rewrite find_any_face using the rbtree.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-13 13:13:19 +01:00
Rémi Bernon ec646de3aa gdi32: Rewrite find_face_from_filename using the rbtree.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-13 13:13:16 +01:00
Rémi Bernon 5cdd011f4e gdi32: Index font families by name in an rbtree.
Keeping them sorted with the vertical / default family rules.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-13 13:13:12 +01:00
Sven Baars ca96e04637 gdi32/tests: Fix a compiler warning.
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 13:58:53 +01:00
Haoyang Chen abd0cddc5f gdi32: Avoid exceeding the actual bitmap height.
The bottom-up case is handled earlier on.  For the top-down
case, 'lines' is left untouched.

Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 13:58:33 +01:00
Francois Gouget dd51cd8d00 gdi32/tests: Avoid a D3DKMTOpenAdapterFromHdc() crash on Windows 10 >= 2004.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Nikolay Sivov b9178da586 gdi32: Merge in Uniscribe functionality.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Rémi Bernon cb1ff768ac gdi32: Implement GdiDllInitialize stub.
This is required by several Call of Duty games that are calling this
directly after loading gdi32.dll from disk.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48171
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 18:20:32 +01:00
Akihiro Sagawa 308a0cf72d gdi32: Fix font rendering issue when child font is used.
Otherwise, freetype_get_glyph_outline() fails at FT_Load_Glyph due to
combination of base_font's ft_face and child font's glyph index.

Fixes a regression introduced by 044315c0b3.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 17:34:27 +01:00
Alexandre Julliard a56487732e gdi32: Initialize the font gamma ramp with the other font options.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 17:34:27 +01:00
Alexandre Julliard b1d920bb9f gdi32: Use wide-character string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 17:34:27 +01:00
Alexandre Julliard aa90a5969f gdi32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:44:16 +01:00
Alexandre Julliard 60ef5b0182 gdi32: Move OSMesa support to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:41:12 +01:00
Alexandre Julliard 3cfafab38b gdi32: Move FreeType support to a new Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:32:04 +01:00
Alexandre Julliard 54a01ea1ec gdi32: Use ntdll functions for heap allocations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:31:02 +01:00
Alexandre Julliard 013f1033c0 gdi32: Use ntdll functions for locale support.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:30:56 +01:00
Alexandre Julliard acc1f6545f gdi32: Use ntdll functions for DOS<->Unix path conversions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:30:50 +01:00
Alexandre Julliard 8db165000d gdi32: Use ntdll functions for codepage conversions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:06:26 +01:00
Alexandre Julliard fd9e1612d9 gdi32: Use FT_MulDiv() instead of the kernel32 function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 10:01:32 +01:00
Alexandre Julliard 8768f60527 gdi32: Store scale as an integer.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 09:59:32 +01:00
Alexandre Julliard fe6bb5f723 gdi32: Don't abort enumeration if a font fails to load.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-05 09:59:22 +01:00
Alexandre Julliard e1b193d8ba gdi32: Make a few definitions private to font.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 21:11:44 +01:00
Alexandre Julliard 53acdd5a8a gdi32: Move the SelectFont() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 21:11:44 +01:00
Alexandre Julliard 3b87839ec9 gdi32: Move the rest of the font matching code out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 21:11:44 +01:00
Alexandre Julliard 4cddf0d47d gdi32: Move the handling of font family fallbacks out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 21:11:44 +01:00
Alexandre Julliard caf0b9c082 gdi32: Add some helper functions for font matching.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 21:11:44 +01:00
Alexandre Julliard 6c5dc58a82 gdi32: Move the remove_font() function out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 21:11:44 +01:00
Alexandre Julliard 000e32f183 gdi32: Update the Windows font registry keys only when they have changed.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 14:53:34 +01:00
Alexandre Julliard a6f0349e84 gdi32: Add a helper function to create a face.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 14:53:34 +01:00
Alexandre Julliard 19d13d0004 gdi32: Move the font cache out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 11:26:39 +01:00
Alexandre Julliard a84c60ed2a gdi32: Add a separate backend function to load the font list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 11:26:12 +01:00
Alexandre Julliard fc44dcdd03 gdi32: Move the font list reordering out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 11:25:47 +01:00
Alexandre Julliard de63a647d5 gdi32: Move the default AA flags handling out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 11:25:30 +01:00
Alexandre Julliard 356ad03fcf gdi32: Move the font enumeration out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 16:01:23 +01:00
Alexandre Julliard c9b21a5707 gdi32: Add a helper function to create a font from a face.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 16:01:23 +01:00
Alexandre Julliard ef77b38888 gdi32: Move the dumping of the font list out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 16:01:23 +01:00
Alexandre Julliard 8d4336c5fa gdi32: Move the creation of the child font list out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 16:01:22 +01:00
Alexandre Julliard bc19adf474 gdi32: Move the font link support out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-31 18:33:33 +01:00
Alexandre Julliard 74ea8d8c42 gdi32: Make the family replacement point to the family object.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 14:40:11 +01:00
Alexandre Julliard d27a9d77ee gdi32: Move the loading of font replacements out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 14:40:11 +01:00
Alexandre Julliard 5537f38e97 gdi32: Move the face data structure out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 14:35:47 +01:00
Alexandre Julliard 6a1cdd98fa gdi32: Move the font family list out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 14:22:51 +01:00
Alexandre Julliard 7e51cc8308 gdi32: Move the font substitution list out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 14:15:55 +01:00
Alexandre Julliard 402281b668 gdi32: Add a helper to get the FreeType face and cleanup private data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 20:19:12 +01:00
Alexandre Julliard 044315c0b3 gdi32: Move the glyph index mapping for GetGlyphOutline() out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 20:19:12 +01:00
Alexandre Julliard 54bdbd3c03 gdi32: Store child font objects directly on the child font list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 15:39:29 +01:00
Alexandre Julliard 8631506270 gdi32: Move the GSUB table support out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 15:39:18 +01:00
Alexandre Julliard 72272d0088 gdi32: Move part of the GetCharWidthInfo() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-28 10:14:01 +01:00
Alexandre Julliard 3749449943 gdi32: Move part of the GetFontUnicodeRanges() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-28 10:13:53 +01:00
Alexandre Julliard ed9114c118 gdi32: Move the CreateScalableFontResource() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 14:26:06 +01:00
Alexandre Julliard 5772b064ac gdi32: Allocate the backend font data in the load_font() helper.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 14:25:32 +01:00
Alexandre Julliard 0bf2c11d43 gdi32: Add a helper to load a font without using a face.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 14:10:41 +01:00
Alexandre Julliard 7b291a094d gdi32: Move the loading of filesystem fonts out of freetype.c.
The fonts Path value now expects DOS paths.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 10:27:32 +01:00
Alexandre Julliard 2c1a42bc67 gdi32: Move the loading of registry fonts out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 10:27:20 +01:00
Alexandre Julliard 131d3b1f5d gdi32: Move the loading of system fonts out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 10:27:06 +01:00
Alexandre Julliard f6d9908e48 gdi32: Move the AddFontMemResourceEx() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 12:05:19 +01:00
Alexandre Julliard 047bf25223 gdi32: Move the Add/RemoveFontResource() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 12:04:36 +01:00
Alexandre Julliard f3a75923a6 gdi32: Move the fonts directory helper functions out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 12:03:21 +01:00
Alexandre Julliard df335e3405 gdi32: Move the kerning pairs data into the generic font structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 11:50:07 +01:00
Alexandre Julliard e0872b6424 gdi32: Move the text metrics cache into the generic font structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 11:43:24 +01:00
Alexandre Julliard a89595a259 gdi32: Set the font file name directly at creation time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 11:37:03 +01:00
Alexandre Julliard a13492b376 gdi32: Don't bother caching the font type.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 20:16:53 +02:00
Alexandre Julliard 5bdc6e0fe6 gdi32: Move the GetGlyphIndices() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:02 +02:00
Alexandre Julliard 2d15ea5012 gdi32: Move the GetFontFileData() implementation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 11:57:48 +02:00
Alexandre Julliard a3b08dd3f3 gdi32: Move the get_glyph_outline() helper to the font function interface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 11:56:47 +02:00
Alexandre Julliard 26f8b4a7bc gdi32: Move the font critical section out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 11:54:35 +02:00
Alexandre Julliard b3d55e2ce5 gdi32: Move the glyph metrics cache out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 11:51:07 +02:00
Alexandre Julliard c44c347dd5 gdi32: Move more font metrics information to the generic font structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 11:49:33 +02:00
Alexandre Julliard 35f5e65197 gdi32: Move the font realization information out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:05:28 +02:00
Alexandre Julliard 6c94c0b04f gdi32: Move the font charset information out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:04:35 +02:00
Alexandre Julliard ecba0d2bbb gdi32: Move the font name information out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:03:51 +02:00
Alexandre Julliard d26462b52a gdi32: Move the font file information out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:02:48 +02:00
Alexandre Julliard 82c140f1a6 gdi32: Move the font cache list out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:01:50 +02:00
Alexandre Julliard d7a54394d4 gdi32: Move the realized font handle allocation out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 10:59:51 +02:00
Alexandre Julliard 3e7f8aa272 gdi32: Move the other exported freetype functions to the font backend table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Alexandre Julliard 46ab536f87 gdi32: Move the font driver out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Alexandre Julliard b6c099cda6 gdi32: Store face data as a single binary value in the registry cache.
This is faster than a bunch of separate string values.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 21:47:55 +02:00
Alexandre Julliard 14395c8535 gdi32: Compare DOS filenames instead of Unix stat information for font files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 16:34:02 +02:00
Alexandre Julliard f51fe9ead3 gdi32: Store the face filename as a DOS path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 15:33:39 +02:00
Alexandre Julliard 29d35db9a5 gdi32: Move font codepage setup out of freetype.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 16:08:21 +02:00
Arkadiusz Hiler 45aee6375d gdi32: Limit GetGlyphOutlineW(uChar) to a WORD.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45400
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 12:01:57 +02:00
Piotr Caban 2370e7b9a1 gdi32: Share font_gamma_ramp structure between all DCs.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 16:41:24 +02:00
Rémi Bernon a404eb7272 gdi32: Use explicit CDECL in gdi_image_bits.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:29:54 +02:00
Rémi Bernon d560182624 gdi32: Look for another secondary font family name.
If English is the current locale, or if the primary langid does not
have a name in the font (in which case the English name is used), look
for another non-English name.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 12:54:36 +02:00
Rémi Bernon d3ba3ca2d0 gdi32/tests: Add test fonts with names in several languages.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 12:54:30 +02:00
Alexandre Julliard a204ad557d makefiles: Expand makedep path at compile time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Rémi Bernon 74357b7d97 gdi32: Compare full name before discarding faces.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon 68ad3162f0 gdi32: Use fixed size array for family and english name.
This stops stealing pointer ownership, and will also make sure the TRACE
messages contain the truncated family names, that are actually compared.

Also rename the fields to make them consistent with most Wine internal
coding style.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon a968b1f668 gdi32: Rename StyleName to style_name for consistency.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon f360057e2f gdi32: Build full name from family + style when missing.
Also add full name in TRACE messages. The gdi32 family not always
matches the real font family, as we match only LF_FACESIZE chars, so it
could make traces confusing.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon cc6951574a gdi32: Rewrite prepend_at helper as get_vertical_name.
And only prepend '@'' if it's not already there.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon 01d82af4a3 gdi32: Introduce ft_face_get_family/style_name helpers.
And use them directly instead of get_family_names.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon afc857436a gdi32/tests: Test extended TTF font names and collisions.
This shows that although Windows is only matching family names up to
LF_FACESIZE chars, and that it doesn't match against the preferred /
typographic family names and styles, it still keeps the faces separate
when the full names don't match. Wine incorrectly discard one of them.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 21:20:39 +02:00
Rémi Bernon e07eb13ae8 gdi32: Only trace new faces when they are added.
Instead of every time they don't match another face.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 15:20:07 +02:00
Shawn M. Chapla 4e4b1d1406 gdi32: Implement EMR_POLYDRAW16 playback.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 11:25:09 +02:00
Shawn M. Chapla 84d2cf02ed gdi32: Pass correct pointer to PolyDraw during EMR_POLYDRAW playback.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 11:25:07 +02:00
Serge Gautherie 743ed29af5 winapi_test: Update generated.c files.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:03 +02:00
Zhiyi Zhang ee1880a756 gdi32/tests: Zero initialize DEVMODE before passing it to EnumDisplaySettings().
Zero initialize DEVMODE before passing it to EnumDisplaySettings(), which may write beyond the end
of the DEVMODE structure on Windows because the dmDriverExtra field is uninitialized.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:06:36 +02:00
Serge Gautherie 99c0ab2ea1 winapi_test: Restore horizontal alignment of macro defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:26:15 +02:00
Dmitry Timoshkov cb511b82bd gdi32: Add support for GCP_USEKERNING to GetCharacterPlacement().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 17:39:24 +02:00
Gijs Vermeulen 53d54af817 gdi32: Fix some test failures when not using X11.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 17:39:08 +02:00
Zhiyi Zhang 0a2d6378d8 gdi32: Support LUID in D3DKMTOpenAdapterFromGdiDisplayName().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 18:12:56 +02:00
Zhiyi Zhang f0ebaffc6a gdi32/tests: Remove tests for VidPnSourceId.
VidPnSourceId may be zero for non-primary adapters.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:40:50 +02:00
Gabriel Ivăncescu 7bb5b074b5 gdi32: Skip scan conversion on overflow.
Fixes a regression introduced by 9bc6f004ce,
which broke when REGION_CreateEdgeTable overflowed.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Huw Davies 31605eb417 gdi32: Move the scan conversion to a helper function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Akihiro Sagawa 9aec1ef3c1 gdi32: Add a vertical font replacement if it's a DBCS font.
For example, if one maps MS Gothic to a font, also map @MS Gothic to
that font.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:28 +02:00
Akihiro Sagawa f3c682edb9 gdi32: Handle vertical faces in the fontconfig fallback.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48440
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:25 +02:00
Alexandre Julliard aa90ed6df6 gdi32: Return 0 char width for missing glyphs.
Fixes a test failure with Emoji font:
font.c:7147: Test failed: Noto Color Emoji: mismatched widths 2145357798/1.33654768e+008

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-02 15:09:35 +02:00
Alexandre Julliard b0e2d046fc opengl32: Make wgl driver entry points WINAPI.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 13:33:20 +02:00
Alexandre Julliard 0a12f25869 gdi32: Use Windows paths to read Wine font directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 13:57:35 +02:00
Alexandre Julliard da604dce34 gdi32: Use Windows paths in add/remove_font_resource().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 13:57:35 +02:00
Alexandre Julliard 907aaf9e72 gdi32: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:41 +02:00
Serge Gautherie d0fd12b909 include: Remove now useless forced WINVER defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:15:16 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Serge Gautherie aa384d3642 tools: Remove 0x0501 API versions forced by winapi_test.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 20:10:44 +01:00
Alexandre Julliard b83af7c763 unicode: Update data tables to Unicode 13.0.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 13:23:11 +01:00
Nikolay Sivov 0f51b732e4 gdi32/tests: Reduce some tracing noise in font tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-26 22:33:38 +01:00
Francois Gouget 0e7392040c gdi32/tests: Remove unnecessary metafile handle traces.
Tracing the handle values is not useful and increases the test report
size.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-25 23:43:18 +01:00
Sven Baars 3c49e3e4c7 gdi32: Handle 0 count in GetCharacterPlacementW.
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 11:14:27 +01:00
Sven Baars 7ef3d8015a gdi32/tests: Add some more GetCharacterPlacement tests.
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 11:14:22 +01:00
Akihiro Sagawa bf06e25f6a gdi32: Fix function names in comments.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Alexandre Julliard 44ce5d9283 unicode: Support fetching a zip containining the data files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-09 09:48:42 +01:00
Nikolay Sivov dc9267dc1c gdi32: Retry with hinting disabled if glyph load failed in hinted mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:27:29 +01:00
Chip Davis 012d996b83 gdi32: Add D3DKMTSetQueuedLimit() stub.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:33:24 +01:00
Alexandre Julliard f17a228d45 unicode: Try harder to reuse subsequences when compressing data arrays.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 19:26:13 +01:00
André Hentschel 2100353861 gdi32: Fix some spec file entries.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 22:45:09 +01:00
Nikolay Sivov 8ab39efe0a gdi32/tests: Remove workarounds for SetLayout().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:11:59 +01:00
Nikolay Sivov 9db0d76322 gdi32/tests: Remove some workarounds in font tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:11:50 +01:00
Zebediah Figura fef352cb81 gdi32/tests: Clarify return values from IntersectClipRect() and ExcludeClipRect().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 20:52:27 +01:00
Zebediah Figura 35f112d0e4 gdi32/tests: Separate and expand tests for GetClipBox().
Fixes test failures on multi-monitor machines.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 20:52:24 +01:00
Nikolay Sivov 624ed18b1f Update to Unicode 12.1.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Francois Gouget 40f5cffadd gdi32/tests: CloseMetaFile() no longer destroys the metafile hdc.
Windows 10 1507 still deleted it but 1607 no longer does.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Jeff Smith 22a4b3fc7e gdi32/tests: Reserve sufficient room for DIB data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48054
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:32 +01:00
Francois Gouget 389d110545 gdi32/tests: Fix a copy/paste error in an ok() message.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Sven Baars c9f15c20f9 gdi32/tests: Remove the D3DKMTCreateDCFromMemory test with Width = 0.
This test fails with STATUS_INVALID_PARAMETER on Windows 7+.

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 10:06:13 +01:00
Sven Baars 742249e91e gdi32/tests: Fix some test SetDIBitsToDevice RLE8 test failures on Windows 2008+.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Sven Baars 0e1720813c gdi32/tests: Remove some Win9x workarounds from the clipping tests.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Sven Baars 7979b87963 gdi32/tests: Update expected ExtCreateRegion behavior to represent newer Windows.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Zhiyi Zhang 644d00d540 winex11.drv: Implement X11DRV_D3DKMTCheckVidPnExclusiveOwnership.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Zhiyi Zhang e08dd25f32 winex11.drv: Implement X11DRV_D3DKMTSetVidPnSourceOwner.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Zhiyi Zhang 354359197b gdi32: Add D3DKMTSetVidPnSourceOwner and D3DKMTCheckVidPnExclusiveOwnership stubs.
D3DKMTSetVidPnSourceOwner needs to be implemented in the graphics drivers
because we need to maintain the VidPN source ownership information list
in the graphics drivers. For example, the graphics drivers need to release the
exclusive ownership when a new window is moved to a monitor which has been taken
exclusive ownership.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Zhiyi Zhang 95c66d690f gdi32: Support multiple monitors in D3DKMTOpenAdapterFromGdiDisplayName.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Paul Gofman 81484b24f4 gdi32: Collapse relative paths inside true type fonts file names in registry.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 10:49:18 +02:00
Zebediah Figura 068093f1aa gdi32: Implement GetCharWidthFloat().
Needed by Cygwin's mintty.exe.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 10:49:09 +02:00
Zhiyi Zhang acd801d3e5 gdi32/tests: Add CreateDC tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Zhiyi Zhang 9cffe80fdc gdi32/tests: Fix a test failure on Win10 1809.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Francois Gouget f9b04a72a9 gdi32: Fix the spelling of some comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 22:58:42 +02:00
Alex Henrie 1fcae3c260 gdi32: Handle HeapAlloc failure in SetEnhMetaFileBits (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Michael Stefaniuc dccbd6a949 gdi32: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:21 +02:00
Michael Stefaniuc 0ae101080b gdi32/tests: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:13 +02:00
Alistair Leslie-Hughes 5373f7264c gdi32: Add D3DKMTQueryStatistics stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47074
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 10:52:03 +02:00
Huw Davies 0b66af673e gdi32: Use the correct type for the final parameter of FSOpenResourceFile().
This is SInt16 for 32-bit, but int for 64-bit.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:26:19 +02:00
Alexandre Julliard 4a902de213 gdi32: Make GDI driver functions cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-06 21:47:58 +02:00
Ken Thomases 7c2d5a7c25 gdi32: Also accept "\\.\DISPLAY<n>" devices names with <n> other than 1 as display devices.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 13:22:17 +02:00
Zhiyi Zhang 955549c4ca gdi32: Implement D3DKMTDestroyDevice.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 13:08:45 +02:00
Zhiyi Zhang 733a92df4b gdi32: Implement D3DKMTCreateDevice.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 13:08:33 +02:00
Zhiyi Zhang 344556f7d5 gdi32: Implement D3DKMTCloseAdapter.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 13:08:12 +02:00
Zhiyi Zhang d37030528e gdi32: Implement D3DKMTOpenAdapterFromGdiDisplayName.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 13:08:06 +02:00
Zhiyi Zhang 4f201cfcc9 gdi32/tests: Add D3DKMTCheckOcclusion tests.
Mostly to show that D3DKMTCheckOcclusion is mainly composed of
ownership checks rather than actually window occlusion. Also
composition status doesn't affect its behavior despite MSDN
say so.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-28 12:06:46 +02:00
Zhiyi Zhang bf3e32b5b0 gdi32/tests: Add D3DKMTSetVidPnSourceOwner tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Zhiyi Zhang af7f3ecd3b gdi32/tests: Add D3DKMTCheckVidPnExclusiveOwnership tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Zhiyi Zhang 13f649fde5 gdi32/tests: Add D3DKMTDestroyDevice tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Zhiyi Zhang c7e4e45761 gdi32/tests: Add D3DKMTCreateDevice tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Zhiyi Zhang 5fdf401fc1 gdi32/tests: Add D3DKMTCloseAdapter tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Zhiyi Zhang b6072314e5 gdi32/tests: Add D3DKMTOpenAdapterFromHdc tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Zhiyi Zhang 012d9bbc23 gdi32/tests: Add D3DKMTOpenAdapterFromGdiDisplayName tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 12:30:04 +02:00
Alexandre Julliard c52b2f1284 make_unicode: Remove duplicate DECLSPEC_HIDDEN.
Spotted by Matteo Bruni.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 11:25:38 +02:00
Fabian Maurer 9bc6f004ce gdi32: CreatePolyPolygonRgn() returns an empty region when the area is empty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46655
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Alexandre Julliard ef07087f47 gdi32: Use the same BiDi direction table as usp10.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Alexandre Julliard 333e6b3c69 make_unicode: Avoid including wine/unicode.h in generated files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Nikolay Sivov 13364151a4 tools: Update to Unicode 12.0.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Michael Stefaniuc 89327da738 gdi32/tests: Avoid the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 11:13:37 +02:00
Akihiro Sagawa eca601d7bb gdi32/tests: Add tests for GetCharWidthInfo().
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Akihiro Sagawa 1128587fd2 gdi32: Implement GetCharWidthInfo().
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Piotr Caban 541c8d271e gdi32: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Alexandre Julliard 3d6febc997 include: Get rid of the DPRINTF() macro.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:34:44 +02:00
Michael Stefaniuc fe7dcc2908 gdi32: Remove unused return value of init_system_links().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:52:59 +01:00
Louis Lenders d150cc192e gdi32: Add D3DKMTCloseAdapter() stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46571
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 17:43:16 +01:00
Francois Gouget 5f79b5f6e5 gdi32: Fix the FreeType case in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:32:41 +01:00
Byeongsik Jeon c666a45560 gdi32: Add a workaround for Freetype < 2.8.1 using v40 FT_LOAD_TARGET_MONO.
Freetype < 2.8.1 v40 has incorrect advance widths and rendering issues.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41639
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Dmitry Timoshkov c4a5485295 wineps.drv: PostScript header should be written by StartDoc instead of StartPage.
Otherwise a being created file has wrong signature if an application
directly injects PostScript code. This patch fixes printing from
Adobe PageMaker.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Dmitry Timoshkov 7338641e89 wineps.drv: Add stubs for escapes required by Adobe PageMaker.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00