Commit Graph

555 Commits

Author SHA1 Message Date
Nikolay Sivov feca77fb0c dwrite: Set isNewline cluster flag.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:17 +09:00
Nikolay Sivov 8b831b9d56 dwrite: Return NULL file pointer on CreateCustomFontFileReference() failure.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:16 +09:00
Nikolay Sivov 7dd4b9b74b dwrite: Don't use BOOL defined values for fields that are not BOOL.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:44:58 +09:00
Nikolay Sivov ef73b788e5 dwrite: Inline object origin is at top-left corner, not baseline.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:44:55 +09:00
Nikolay Sivov fbcf15313d dwrite: Return valid metrics for layout created on empty text.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:44:51 +09:00
Nikolay Sivov df68743187 dwrite/tests: Some tests for layout based on empty text.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:44:48 +09:00
Nikolay Sivov 8485fa64ca dwrite: Fix parameter validation in CreateTextLayout()/CreateGdiCompatibleTextLayout().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:44:44 +09:00
Nikolay Sivov 2c6799dfe2 dwrite: Line height/baseline includes lineGap as well.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-27 23:52:25 +09:00
Nikolay Sivov 3254a6b2d6 dwrite: Fix invalid cluster metrics array index access.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-27 23:52:17 +09:00
Nikolay Sivov f27b99ec2f dwrite: Implement DetermineMinWidth() using line breaking info.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 22:40:40 +09:00
Nikolay Sivov 2975ae9cbf dwrite: Fix setting canWrapLineAfter cluster flag.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 22:40:37 +09:00
Nikolay Sivov d171185062 dwrite: Reuse linebreaking isSoftHyphen flag for cluster metrics.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 22:40:34 +09:00
Nikolay Sivov 00766538c5 dwrite: Reuse linebreaking whitespace flag when filling cluster metrics.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 22:40:31 +09:00
Nikolay Sivov 0b7f857845 dwrite: Zero width space U+200b is not a whitespace from analyzer/layout point of view.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 22:40:27 +09:00
Nikolay Sivov a62a9fcc1f dwrite: Fix underline/strikethrough position adjustment caused by text alignment.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 16:11:44 +09:00
Nikolay Sivov 3fa5ebd014 dwrite: Remove useless assignment (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 16:11:40 +09:00
Nikolay Sivov 2626f80b01 dwrite: Don't check for line overflow for DWRITE_WORD_WRAPPING_NO_WRAP mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 16:11:36 +09:00
Nikolay Sivov 10b843bb22 dwrite: Update line breaking logic with Unicode 8.0.0 modifications.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 16:11:31 +09:00
Nikolay Sivov 68c45de6ae dwrite: Fix off by one issue in line breaking rule LB21a.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 16:11:27 +09:00
Nikolay Sivov 91df67df0c dwrite: Cluster text position is relative to initial run.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-25 16:11:23 +09:00
Nikolay Sivov eae84e7dde dwrite: Return earlier from GetKerningPairAdjustments() when pair kerning is not supported.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 17:54:59 +09:00
Nikolay Sivov ed3b5a42be dwrite: Ask freetype once about kerning pairs support and monospaced property.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 17:54:59 +09:00
Nikolay Sivov 6024656f98 dwrite: Underline reading direction matches run direction.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 14:48:57 +09:00
Nikolay Sivov adfd1ad2ce dwrite: Underline origin is always at the left run boundary.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 14:48:53 +09:00
Nikolay Sivov ff8f129af6 dwrite: Use callback freetype API to implement GetGlyphRunOutline().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-19 20:48:07 +09:00
Nikolay Sivov f586683e78 dwrite/tests: A test to compare font metrics with bold simulation and without.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-18 14:19:18 +09:00
Nikolay Sivov d4438dae93 dwrite: Fix comment typos.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-18 14:19:09 +09:00
Nikolay Sivov ac7954b7b9 dwrite: Always initialize out pointers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 23:53:06 +09:00
Nikolay Sivov 0874c7be15 dwrite: Store locale name range attribute in lower case.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 15:11:10 +09:00
Nikolay Sivov c5fce83f3d dwrite: Implement support for underlines.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 15:11:04 +09:00
Nikolay Sivov 943fb2c071 dwrite: Scale strikethrough thickness and position with current font size.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-14 16:32:56 +09:00
Nikolay Sivov 261563f28e dwrite: Handle bitmap allocation error when rendering to bitmap target.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-14 16:32:52 +09:00
Nikolay Sivov 18b0ca3fe3 dwrite: Fix strikethrough baseline origin.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 16:05:02 +09:00
Nikolay Sivov 1a8e957b19 dwrite: Pass drawing effect to renderer in DrawStrikethrough().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 16:04:56 +09:00
Nikolay Sivov 2b5928b228 dwrite: Pass drawing effect to renderer in DrawGlyphRun().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 16:04:50 +09:00
Nikolay Sivov c0fb6f436b dwrite: Keep underlines in separate list.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 16:04:46 +09:00
Nikolay Sivov a4562cca50 dwrite: Start new effective run on strikethrough, underline or effect change.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 16:04:39 +09:00
Nikolay Sivov 0f67df657d dwrite: Fix a leak on error path.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-11 23:05:51 +09:00
Nikolay Sivov f6862b13b7 dwrite: Make position snapping more compact.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-11 23:05:49 +09:00
Nikolay Sivov 74f00fa17d dwrite: Consistently use explicit float literals.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-11 23:05:46 +09:00
Nikolay Sivov b1094bc7d7 dwrite: Store locale name in lower case for text format.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-09 17:30:03 +09:00
Nikolay Sivov f8a228d261 dwrite/tests: Some tests for drawing underlines.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-09 17:30:03 +09:00
Nikolay Sivov 57bfebfc80 dwrite: Implement EUDC font collection.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-29 17:11:51 +01:00
Nikolay Sivov ead6905ddb dwrite/tests: Some tests for SetUnderline().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-29 17:11:46 +01:00
Nikolay Sivov 8165cba0f8 dwrite/tests: Fix test failures on older versions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-29 17:11:42 +01:00
Nikolay Sivov b02e61c4b3 dwrite: Fix identical ranges merging.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 14:07:39 +01:00
Nikolay Sivov 3c16587ed4 dwrite: Locale layout ranged attribute is case-insensitive.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 14:07:37 +01:00
Nikolay Sivov 6ba2c25d45 dwrite: Store optical alignment property.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 14:07:35 +01:00
Nikolay Sivov 3905ed8c47 dwrite: Store last line wrapping property.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 14:07:33 +01:00
Nikolay Sivov 7a83be7bd2 dwrite: Optimize for the most common case of layout object initialization.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 14:07:30 +01:00