Piotr Caban
b6204639ba
gdi32: NULL terminate output string in CreateDCW.
2022-11-29 19:11:19 +01:00
Piotr Caban
1cf1412a12
gdi32: Get printer output file name in StartDoc.
2022-11-22 18:27:30 +01:00
Piotr Caban
4e527045d5
gdi32: Don't crash in StartDoc on NULL DOCINFO.
2022-11-22 18:27:30 +01:00
Alexandre Julliard
a1c8232b33
include: Remove custom/undocumented language identifiers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-11-16 21:24:18 +01:00
Tarcísio Ladeia de Oliveira
61f566260b
gdi32/tests: Fix assertion message.
2022-11-07 21:13:32 +01:00
Ziqing Hui
b558c87c50
gdi32/uniscribe: Add fallback font for Kana and CJK script.
...
This fixes Chinese and Japanese text display issue for
Sins of a Solar Empire: Rebellion.
2022-11-04 19:23:55 +01:00
Mark Jansen
4312be1646
gdi32: Fix possible overflow.
...
According to the documentation of ScriptShape function, the psva argument should have the number of elements indicated by cMaxGlyphs.
2022-10-11 20:54:18 +02:00
Francois Gouget
2d19baa6b5
gdi32/tests: Mark tests failing randomly on Windows as flaky.
...
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51313
2022-10-11 17:13:36 +02:00
Alexandre Julliard
7ab46c4f21
unicode: Update to Unicode 15.0.0.
2022-09-14 22:38:34 +02:00
Alexandre Julliard
3e3caf1efd
gdi32/tests: Mark some tests that fail without Vulkan as todo.
2022-09-13 22:07:22 +02:00
Alexandre Julliard
24da06789e
unicode: Add data for high Unicode planes to the bidi direction table.
2022-09-05 18:41:47 +02:00
Alexandre Julliard
ba58338b21
unicode: Add data for high Unicode planes to the linebreak table.
2022-09-05 18:41:47 +02:00
Zhiyi Zhang
58b477d158
win32u: Choose a smaller ppem to avoid exceeding the requested font height.
...
When height > 0, CreateFontA/W() should not return a font face exceeding the requested height.
For instance, Tahoma has 2049 units of ascent, 423 units of descent and its units per EM square is
2048. When requesting a font 20 pixels in height, ppem = units_per_EM * requested_height / (ascent + descent)
= 2048 * 20 / (2049 + 423) = 16.57 ~= 17. When getting the resulting height back from the ppem,
resulting_height = (ascent + descent) * ppem / units_per_EM = (2049.0 + 423) * 17 / 2048 = 20.52
~=21. So it ends up getting a larger font than requested and violates the spec.
Fix Nancy Drew: Legend of the Crystal Skull crash at start.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-19 22:45:18 +02:00
Zhiyi Zhang
821b36e00b
gdi32/tests: Add more tests for GetTextMetrics().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-19 22:45:18 +02:00
Jacek Caban
2b6647cdd5
win32u: Use platform-independent layout for DC_ATTR.
2022-08-09 15:55:43 +02:00
Zhiyi Zhang
546cbdc250
win32u: Create a dummy bitmap for display device contexts.
...
On Windows 7 and older versions of Windows, calling GetCurrentObject(hdc, OBJ_BITMAP) for a display
device context will return a valid handle. However, this handle will fail for GetObject(). On newer
versions of Windows, GetCurrentObject(hdc, OBJ_BITMAP) for display device contexts returns a bitmap
of virtual screen size and its size changes after display mode changes. This behavior is tested in
the _check_display_dc() function in user32/tests/monitor.c.
The screen shot function of WeChat depends on GetObject() to either return failure or a valid size
for the bitmap from display device contexts. Since Wine currently report Windows 7 as default and to
save memory, the Windows 7 behavior is implemented.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-05-30 22:07:42 +02:00
Huw Davies
6a9a80679d
gdi32: Free the client-side emf dc info.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
2022-05-24 17:34:59 +02:00
Huw Davies
0c8a076e78
gdi32: Remove second initialization of emf->dc_attr.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
2022-05-24 17:34:59 +02:00
Zhiyi Zhang
8bc0c8d646
gdi32: Implement D3DKMTQueryVideoMemoryInfo().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 17:50:43 +02:00
Zhiyi Zhang
37b74e644a
gdi32/tests: Add D3DKMTQueryVideoMemoryInfo() 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>
2022-05-17 17:50:30 +02:00
Francois Gouget
0519aec310
gdi32/tests: Trace the invalid height in test_max_height().
...
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 16:14:25 +02:00
Alexandre Julliard
7500fc1ce9
gdi32: Support UTF-8 codepage in TranslateCharsetInfo().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52847
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-22 13:06:15 +02:00
Nikolay Sivov
f534e3f499
gdi32: Use NtUserGetSysColor() directly.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-19 17:35:33 +02:00
Jacek Caban
cfb6f9a1e8
win32u: Introduce inline helpers for NtUserCallHwndParam calls.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 18:13:28 +02:00
Jacek Caban
7f64eead50
win32u: Introduce inline helpers for NtUserCallOneParam calls.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 18:13:06 +02:00
Jacek Caban
dcca04606e
win32u: Use NtUserCallHwndParam for MirrorRgn 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>
2022-04-13 18:12:59 +02:00
Eric Pouech
5c637c228f
gdi32/tests: Enable compilation with long types.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-28 10:31:43 +01:00
Jacek Caban
2353ef9bd5
gdi32: Link directly to user32.
...
On Windows, loading gdi32.dll causes user32.dll to be loaded. It's
important for win32u, which is not fully functional until user32 sets
KernelCallbackTable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 22:16:03 +01:00
Eric Pouech
b31225da21
gdi32: Enable compilation with long types.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 18:09:46 +01:00
Eric Pouech
b072f01e13
win32u: Change NtGdiPolyPolyDraw parameter to ULONG.
...
As suggested by Nikolay Sivov.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:19 +01:00
Fabian Maurer
86d36aefc8
gdi32/tests: Avoid "misleading indentation" warnings.
...
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>
2022-01-28 09:55:04 +01:00
Alexandre Julliard
f0cd33c69e
include: Add support for defining Win32 types as 'long' where possible.
...
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Alex Henrie
ec72025cff
gdi32/tests: Drop font test workarounds for Windows <= 2000.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 13:21:04 +01:00
Alex Henrie
524dbe4bef
gdi32/tests: Mark a GetTextExtentPointW test as broken on Windows 10.
...
Fixes a testbot failure.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 13:21:01 +01:00
Jacek Caban
2aba4c5839
win32u: Use NtUserCallTwoParam for MirrorRgn 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-12-07 20:24:38 +01:00
Zhiyi Zhang
1febcf692f
gdi32/tests: Test deleting the bitmap used for pattern brush creation.
...
Test that the bitmap for pattern brush creation can be deleted after CreatePatternBrush() and the
created brush will still function normally. However, the bitmap object can not be retrieved from
LOGBRUSH.lbHatch if the bitmap is deleted.
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-12-07 12:21:50 +01:00
Jacek Caban
f359c7f60c
win32u: Use NtUserSelectPalette instead of GDISelectPalette.
...
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-12-03 16:56:08 +01:00
Jacek Caban
41eac6e25c
win32u: Use NtUserCallOneParam instead of GDIRealizePalette.
...
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-12-03 16:56:08 +01:00
Zebediah Figura
220b0a7c06
win32u: Do not free user memory when deleting dibs created with NtGdiDdDDICreateDCFromMemory().
...
This fixes a test crash in ddraw:ddraw1 introduced by
7d2a7b94aa
.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Zebediah Figura
c1ed24c86e
gdi32/tests: Test whether D3DKMTDestroyDCFromMemory() frees the DC memory.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Alexandre Julliard
d2e7a977cf
gdi32/tests: Use the OS/2 last char for the Ansi charset limit.
...
Fixes a test failure with the cmmi10.ttf font.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-14 12:29:24 +01:00
Akihiro Sagawa
0d1b8adc9c
win32u: Use a real family name as otmpFamilyName for substituted face.
...
GetTextFace remains to return the original face name, e.g. MS Shell Dlg.
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-11-08 11:42:47 +01:00
Akihiro Sagawa
64c31e63b8
gdi32/tests: Test substituted face family name.
...
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-11-08 11:42:45 +01:00
Jinoh Kang
9301a9e1f8
gdi32: Calculate effective number of scan lines and truncate bitmap bits for EMR_SETDIBITSTODEVICE.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang
da126e19e3
gdi32: Allow passing BITMAPINFO with bmiHeader.biSizeImage == 0 for EMF DC.
...
User-facing APIs should accept biSizeImage == 0, and fix it up accordingly.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51834
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang
03e9b882a2
gdi32: Fix bounding box calculation for EMR_STRETCHDIBITS.
...
rclBounds should denote a closed interval for each axis.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang
3f7df2a5f6
gdi32/tests: Add tests for recording SetDIBitsToDevice in EMFs.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Jinoh Kang
53617db97a
gdi32/tests: Add tests for recording StretchDIBits in EMFs.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Francisco Casas
379333e3c7
gdi32: Do not sign extend 64-bit gdi handles.
...
Testing on Windows shows typically handles are not sign extended,
however sometimes they are. It's not clear what triggers the change
in behaviour.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 22:40:50 +02:00
Francisco Casas
d85b700df9
gdi32: Avoid integer overflow in the obj map compare fn.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 22:40:50 +02:00