Commit Graph

471 Commits

Author SHA1 Message Date
Nikolay Sivov 2d6a23bef6 gdi32: Implement GetFontFileData().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-21 20:33:16 +01:00
Nikolay Sivov 93eca9e919 gdi32: Set data size for fonts created from memory.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-21 20:10:57 +01:00
Nikolay Sivov 03ccce70b5 gdi32: Improve GetFontFileInfo() compatibility.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-21 20:10:52 +01:00
Byeongsik Jeon 590c8b82c8 gdi32: Fix the linked child font bold, italic style correctly.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Byeongsik Jeon 7da7930a10 gdi32: Specify the suitable hinting flags explicitly.
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>
2018-11-13 10:43:43 +01:00
Byeongsik Jeon 2b52474fdd gdi32: Respect the FC_ANTIALIAS setting for the FC_RGBA_NONE case.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 14:49:25 +01:00
Byeongsik Jeon af90ab3259 gdi32: Remove the code that doesn't work as intended around FcFontList().
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 14:49:24 +01:00
Byeongsik Jeon 2fe859b8ef gdi32: Support other settings for obtaining the default_aa_flags value.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 11:30:06 +01:00
Byeongsik Jeon fe6d35f3cb gdi32: Move the 'if' branch out of the loop.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-10 17:43:32 +02:00
Byeongsik Jeon 11d68d05a7 gdi32: Remove unnecessary operations.
The rgb part works from text rendering to alpha value.
The '24' part is an unnecessary operation.

Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-10 17:43:20 +02:00
Byeongsik Jeon 66e446c5ec gdi32: Improves the subpixel rendering availability for FreeType 2.8.1+.
FreeType 2.8.1+ implemented its own subpixel rendering.
So FT_Err_Uniplemented_Feature check is not the reliable way.

Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 12:38:22 +02:00
Michael Stefaniuc fb7a8d92fd gdi32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 12:46:18 +02:00
Dmitry Timoshkov c1f742021f gdi32: For symbol fonts check whether the char has been converted to Unicode.
This means that Unicode versions of text functions can use the result
of a A->W conversion under CP_ACP.

It's required so that the following will work:
  hfont = CreateFont("Wingdings", SYMBOL_CHARSET);
  SendMessageA(hwnd, WM_SETFONT, hfont);
  SendMessageA(hwnd, WM_SETTEXT, textA);

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:45:33 +02:00
Roderick Colenbrander 3de61a9dd9 winevulkan: Define vulkan driver interface.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-27 12:47:16 +01:00
Akihiro Sagawa dce3e17185 gdi32: Fix text metrics in synthetic bold bitmap fonts.
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>
2018-02-19 16:55:08 +01:00
Akihiro Sagawa 68f9fb556d gdi32: Fix synthetic bold outline text metrics.
Without this fix, synthetic tmAveCharWidth value unintentionally affects
SCALE_X calculation.

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>
2018-02-19 16:55:08 +01:00
Akihiro Sagawa c17a8f32c4 gdi32: Fix ABC width calculations when using vertical 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>
2018-02-08 10:20:24 +01:00
Akihiro Sagawa 2a402a427a gdi32: Fix ABC width calculations when applying transformations internally.
This fixes a regression introduced by f6bc356860.

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>
2018-02-08 10:20:16 +01:00
Huw Davies ccc871dcd0 gdi32: Set otmMacLineGap from the line gap in the hhea table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-19 19:49:02 +01:00
Alex Henrie d819609255 gdi32: Scale outline font metrics as signed integers.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-19 19:49:01 +01:00
Fabian Maurer 6f790606c0 gdi32: In AddFaceToList allow fonts with long names and add tests.
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>
2017-11-28 22:00:39 +01:00
Nikolay Sivov d82321006d gdi32: Pick first charmap if none was selected using preferred encoding.
FreeType 2.8.1 has similar logic removed from WinFNT module,
that always pre-selected first charmap.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 11:20:08 +02:00
Nikolay Sivov 2bd5f6e057 gdi32: Remove runtime check for FT_Set_Charmap().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 11:20:01 +02:00
Huw Davies 2dfb09893c gdi32: Try to read the dpi from the user key first.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:22:47 +02:00
Piotr Caban 3471b59ae0 gdi32: Only delete unmodified font keys in delete_external_font_keys.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-26 10:59:40 +02:00
Piotr Caban 93def703cf gdi32: Allocate smaller buffer in delete_external_font_keys helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-26 10:59:40 +02:00
Nikolay Sivov 215e8b10a8 gdi32: Trace charmap encoding as 4 bytes tag.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:20 +02:00
Nikolay Sivov 533d800d42 gdi32: Cleanup otmfsType bit mask from reserved bits.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 10:00:02 +01:00
Ken Thomases d684831f4a gdi32: Get the font URL directly from the descriptor on macOS 10.6 and later.
It's significantly faster than the roundabout way that's necessary for
10.5, which is especially important for users with many fonts installed.
Issue identified by Andrew Eikum.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-29 19:14:22 +01:00
Nikolay Sivov fcd0f6b074 gdi32: Append "TrueType" suffix to registry key names.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 18:28:41 +09:00
Nikolay Sivov 492b10ef6c gdi32: Simplify font table name tracing.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 18:28:38 +09:00
Nikolay Sivov 7e50116b52 gdi32: Support special 'ttcf' tag in GetFontData().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-12 20:38:20 +09:00
Nikolay Sivov cd68821780 gdi32: Keep font tables tags defined in one place.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-12 20:38:02 +09:00
Huw Davies 0f2a776a59 gdi32: Convert a few uses of get_dc_ptr() to get_physdev_dc().
In these cases we have the PHYSDEV meaning we own the DC already.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 23:43:35 +09:00
Jactry Zeng 5bf4345824 gdi32: Load system fonts on Android.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 17:08:30 +09:00
Alexandre Julliard 1eac54ef7d gdi32: Take into account the fontdir directory specified at build time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-17 19:44:01 +09:00
Nikolay Sivov 4b05cac391 gdi32: Use a macro instead of accessing FT_Face flags directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 19:20:50 +09:00
Alexandre Julliard 0bbeaae678 make_unicode: Mark most data tables as hidden.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 00:25:01 +09:00
Nikolay Sivov 932838faa3 gdi32: Only REG_SZ and REG_MULTI_SZ types make sense for font replacement, ignore the rest.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:06:54 +09:00
Nikolay Sivov c98f40e227 gdi32: Fix otmfsSelection to have bold style set in case of bold simulation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-10 13:40:28 +09:00
Nikolay Sivov 6389f41135 gdi32: Fix otmfsSelection to have italic style set in case of oblique simulation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 23:27:13 +09:00
Akihiro Sagawa a8d426e93a gdi32: Implement synthesizing bold glyphs for bitmap fonts.
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>
2016-01-15 23:49:54 +09:00
Akihiro Sagawa ba79c19d09 gdi32: Return an boolean value whether synthesizing bold glyph is success.
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>
2016-01-15 23:49:49 +09:00
Akihiro Sagawa 34e7361790 gdi32: Fix the advance width in synthetic bold glyphs with scaling.
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>
2016-01-15 23:49:43 +09:00
Akihiro Sagawa f0831ecd2f gdi32: Add a helper function to calculate the glyph advance metric.
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>
2016-01-15 23:49:39 +09:00
Akihiro Sagawa 79ab7456ed gdi32: Fixup the internal ntmFlags for bitmap fonts.
The value is used not for APIs, but for our fake-bold implementation.

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>
2016-01-05 11:48:47 +01:00
Qian Hong e50cd3b06b gdi32: Initialize system font link registry.
Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-09 23:10:06 +09:00
Dmitry Timoshkov d774442e8d gdi32: Fix heap corruption.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 00:25:34 +09:00
Nikolay Sivov 819d36786e gdi32: Improve structure layout of data returned by GetFontRealizationInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-09 13:00:32 +09:00
Nikolay Sivov 6f7dfe2cea gdi32: Implement GetFontFileInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2015-10-05 22:27:11 +09:00