Commit Graph

762 Commits

Author SHA1 Message Date
jamie dale
197096d214 Ensure font size and scale aren't set to negative values within FreeType
#jira
[FYI] Graham.Lewis
#rb none
#rnx


#ROBOMERGE-SOURCE: CL 8224131 via CL 8230146
#ROBOMERGE-BOT: (v401-8057353)

[CL 8230883 by jamie dale in Main branch]
2019-08-23 12:08:31 -04:00
jamie dale
6bdb3390a0 Added support for rendering TTF/OTF fonts containing bitmaps, including color fonts (like Emoji)
Note: Bitmap fonts require FreeType 2.10, and support is compiled out if using an older version.

Font Rendering:
 - ApplySizeAndScale now computes the desired pixel size manually (using our desired DPI) rather than calling FT_Set_Char_Size.
   - This also includes the font scale, which avoids the call to FT_Set_Transform and lets us remove some workarounds for inconsistent scaling from FreeType.
   - For scalable fonts the desired pixel size is passed to FT_Set_Pixel_Sizes.
   - For bitmap fonts the desired pixel size is used to find the most suitable strike size (set via FT_Select_Size) and the ratio needed to scale that strike to the desired size (see GetBitmapAtlasScale and GetBitmapRenderScale).
 - AppendGlyphFlags has been updated to load color data (when available), and to only exclude bitmap data for fonts that also have scalable data.
 - FSlateFontRenderer::GetRenderDataInternal has been updated to handle color bitmap rendering (BGRA, sRGB) in addition to the existing grayscale rendering.
   - It will also handle scaling down bitmap font strikes that are larger than the desired size, which saves space in the atlas (see GetBitmapAtlasScale).
   - It won't scale up any bitmaps, as that is handled by the transform applied when batching the glyph quads for rendering (see GetBitmapRenderScale).
 - Added support for disabling outline and tint for bitmap fonts (in Slate and Canvas).
 - Added support for batching both grayscale (8-bit alpha-only) and color (8-bit per-channel BGRA) font quads from a font texture atlas (in RHI, D3D, and OpenGL).
 - Removed unused data from FCharacterRenderData.

#jira
#rb Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 8177432 via CL 8197318
#ROBOMERGE-BOT: (v401-8057353)

[CL 8197520 by jamie dale in Main branch]
2019-08-21 17:23:59 -04:00
John White
44b404167d Add support to the Editor to allow rendering onto HDR monitors
#jira none
#rb Brian,Guillaume,Rod

[CL 8174116 by John White in Main branch]
2019-08-21 11:22:04 -04:00
jamie dale
8cc7804b45 Text Shaping Improvements:
- The font selection process for HarfBuzz shaping now processes text as grapheme clusters, which ensures that things like zero-width joiners are applied using the correct font.
 - The font ranges are now selected using codepoints (UTF32CHAR) rather than platform specific characters (TCHAR).
   - This allows characters outside of the BMP to choose the correct font, even on platforms using UTF-16 strings (surrogate pairs are combined when processing the grapheme clusters).
 - The logic for calculating the number of characters and grapheme clusters in a glyph have been combined into a single optimized loop (separately for LTR and RTL text) which fixes some counting issues in the old code.

#jira
#rb Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 8127222 via CL 8132376
#ROBOMERGE-BOT: (v401-8057353)

[CL 8157701 by jamie dale in Main branch]
2019-08-21 09:05:21 -04:00
matt kuhlenschmidt
1018a0db8d Fix hit testable widgets not always being removed from the hit test grid when a parents visibility changes.
[REVIEW]


#ROBOMERGE-SOURCE: CL 8126418 via CL 8126494 via CL 8126581 via CL 8132180
#ROBOMERGE-BOT: (v401-8057353)

[CL 8157233 by matt kuhlenschmidt in Main branch]
2019-08-21 08:58:29 -04:00
matt kuhlenschmidt
d70d980a87 Defer cached slate rendering data clean up until the end of the frame to ensure it doesnt get out of order with deferred updates from retainers
#ROBOMERGE-SOURCE: CL 8117188 via CL 8117189 via CL 8119395
#ROBOMERGE-BOT: (v401-8057353)

[CL 8119422 by matt kuhlenschmidt in Main branch]
2019-08-19 16:11:48 -04:00
matt kuhlenschmidt
026b2002e0 Fix hit test grid not resetting cells if the total amount of cells remains the same after a resize but the width and height differ. This also fixes a crash with retainer panels in that situation
#ROBOMERGE-SOURCE: CL 8113329 via CL 8113334 via CL 8115790
#ROBOMERGE-BOT: (v401-8057353)

[CL 8115976 by matt kuhlenschmidt in Main branch]
2019-08-19 12:20:39 -04:00
nick darnell
55b17cc1de Slate - Switching several bool console vars over to be bools, not ints now that they're fully supported.
[FYI] Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 8095498 via CL 8100173 via CL 8109054
#ROBOMERGE-BOT: (v401-8057353)

[CL 8109149 by nick darnell in Main branch]
2019-08-17 01:42:58 -04:00
matt kuhlenschmidt
121b405b9d Guard against widgets in the tree more than once in ricky bobby. This is illegal and can cause crashes
[CODEREVIEW] nick.darnell


#ROBOMERGE-SOURCE: CL 8092502 via CL 8096604
#ROBOMERGE-BOT: (v401-8057353)

[CL 8096607 by matt kuhlenschmidt in Main branch]
2019-08-16 14:23:08 -04:00
matt kuhlenschmidt
43e13a6791 Added missing file from last checkin
#ROBOMERGE-SOURCE: CL 8030219 via CL 8035494 via CL 8035653 via CL 8045857
#ROBOMERGE-BOT: (v400-8057353)

[CL 8062990 by matt kuhlenschmidt in Main branch]
2019-08-15 14:01:11 -04:00
matt kuhlenschmidt
8a57e9106f Fix retainers nested in invalidation panels not bubbling layout to their parents.
#ROBOMERGE-SOURCE: CL 8030195 via CL 8035484 via CL 8035646 via CL 8045849
#ROBOMERGE-BOT: (v400-8057353)

[CL 8062986 by matt kuhlenschmidt in Main branch]
2019-08-15 14:01:03 -04:00
andrew rodham
37308b2d1d Slate: Protect against re-entrancy initiated panel children destructors when emptying panel children
#jira UE-78721
#jira UE-78878
#rb Chris.Gagnon
#lockdown Cristina.Riveron

#ROBOMERGE-SOURCE: CL 8054497 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v399-8035122)

[CL 8054527 by andrew rodham in Main branch]
2019-08-15 00:19:11 -04:00
Marc Audy
1c3be81dca Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 7950634
#rb
#rnx

[CL 7950994 by Marc Audy in Dev-Framework branch]
2019-08-12 12:52:39 -04:00
Marc Audy
5cd82fd5c0 Packing tweak
#rnx
#rb

[CL 7843694 by Marc Audy in Dev-Framework branch]
2019-08-07 15:47:38 -04:00
nick darnell
20c868f5a8 Slate - Changing the ForceVolatile flag now checks if it's changed before invalidating, and it now only invalidates Volatility.
Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 7761341 via CL 7761384 via CL 7769503
#ROBOMERGE-BOT: (v385-7708028)

[CL 7769590 by nick darnell in Main branch]
2019-08-05 13:24:28 -04:00
matt kuhlenschmidt
5cdd755403 Fix situations where slate draw elements get stuck on screen because they are drawn once and registered as cached and never put on the fast path for some reason (usually a list scrolling and clearing widgets the same frame it adds them)
#ROBOMERGE-SOURCE: CL 7698510 via CL 7698666 via CL 7698687 via CL 7702972
#ROBOMERGE-BOT: (v384-7690951)

[CL 7703028 by matt kuhlenschmidt in Main branch]
2019-08-01 18:07:03 -04:00
nick darnell
66d6f356e1 Slate - Removing some log spam from emptying slate cached element data.
#ROBOMERGE-SOURCE: CL 7681651 via CL 7681682 via CL 7681694 via CL 7689323
#ROBOMERGE-BOT: (v383-7686620)

[CL 7689407 by nick darnell in Main branch]
2019-08-01 13:09:37 -04:00
matt kuhlenschmidt
87fdb93e84 Fix hit test grid returning disabled widgets
#jira UE-78094


#ROBOMERGE-SOURCE: CL 7671379 via CL 7671728 via CL 7676976
#ROBOMERGE-BOT: (v381-7673386)

[CL 7677138 by matt kuhlenschmidt in Main branch]
2019-07-31 18:39:44 -04:00
nick darnell
93515cace1 Slate - Removing the hack that was placed in the TextLayout to overcome a vectorization compiler bug that has been fixed.
Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 7664638 via CL 7664644 via CL 7671882
#ROBOMERGE-BOT: (v376-7668820)

[CL 7672257 by nick darnell in Main branch]
2019-07-31 12:13:07 -04:00
matt kuhlenschmidt
854633ea06 Disable ensure that will always happen during prepass. Its not a valid place to ensure.
#ROBOMERGE-SOURCE: CL 7661814 via CL 7662847 via CL 7670070
#ROBOMERGE-BOT: (v376-7668820)

[CL 7670144 by matt kuhlenschmidt in Main branch]
2019-07-31 11:34:20 -04:00
nick darnell
2ba9b6355d Build - Fixing shipping/test builds.
#ROBOMERGE-SOURCE: CL 7649908 via CL 7649909 via CL 7653084
#ROBOMERGE-BOT: (v372-7473910)

[CL 7653335 by nick darnell in Main branch]
2019-07-29 17:12:42 -04:00
nick darnell
a8dec03ac3 SWidget - Adding Slate.EnsureAllVisibleWidgetsPaint, it's off by default, but can be turned on to find cases where users are earlying out drawing a child that's visible along their paint path. When we're on the Fast drawing path, ALL children must be drawn otherwise their cached draw elements don't get cleared. Enabling this mode vets that after each widget paints all of its visible children painted.
Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 7649814 via CL 7649819 via CL 7652751
#ROBOMERGE-BOT: (v372-7473910)

[CL 7652978 by nick darnell in Main branch]
2019-07-29 17:10:19 -04:00
matt kuhlenschmidt
509b790b92 Fix social panel disappearing when switching social panel tabs.
Social panel was incorrectly marked as having volatlity inherited by a parent



#ROBOMERGE-SOURCE: CL 7627797 via CL 7627852 via CL 7627860 via CL 7635820
#ROBOMERGE-BOT: (v372-7473910)

[CL 7635855 by matt kuhlenschmidt in Main branch]
2019-07-26 13:11:58 -04:00
nick darnell
dc728c76dd SlateGI - Disabling culling when we're on the fast path, adding some TODOs for clearing content in the futre instead.
[FYI] Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 7621559 via CL 7621561 via CL 7621562 via CL 7626302
#ROBOMERGE-BOT: (v372-7473910)

[CL 7626474 by nick darnell in Main branch]
2019-07-25 10:51:20 -04:00
nick darnell
418a3dbc69 SlateGI - Providing another FChildren container that can support multiple FChildren linked together.
[FYI] Matt.Kuhlenschmidt


#ROBOMERGE-SOURCE: CL 7621540 via CL 7621549 via CL 7621551 via CL 7626294
#ROBOMERGE-BOT: (v372-7473910)

[CL 7626466 by nick darnell in Main branch]
2019-07-25 10:51:17 -04:00