Commit Graph

7 Commits

Author SHA1 Message Date
Jamie Dale
4fe626b03a Made FSlateFontInfoStructCustomization use GET_MEMBER_NAME_CHECKED
[CL 2514358 by Jamie Dale in Main branch]
2015-04-16 11:46:50 -04:00
Jamie Dale
446e0d00ee Added warnings for when FSlateFontInfo is created with a null font, or a font that can't provide a valid composite font
This also stops offline (bitmap) cached fonts from reporting that they're able to provide a composite font (they can't).

This makes it clearer when Slate will be forced to use the fallback font path, which may not always be as fast as the standard font path.

[CL 2482035 by Jamie Dale in Main branch]
2015-03-17 15:39:05 -04:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Jamie Dale
7304f3e03a Fixed crash getting the font info being edited while transitioning to PIE
UE-6203 - Crash when PIE after changing value of wrap text in UMG

IPropertyHandle::AccessRawData can return null values while we're transitioning to PIE, and these should not be added to the array of structs returned by FSlateFontInfoStructCustomization::GetFontInfoBeingEdited as all of those entries are assumed to be valid, non-null, pointers.

[CL 2375943 by Jamie Dale in Main branch]
2014-12-04 09:38:51 -05:00
Jamie Dale
59d60efa73 Speculative fix for a crash when a nested widget is changed
UE-5795 - UMG: Crash when changing font size on TextBlock in a widget that was referenced by another widget (both UMG editors opened)

We were getting a crash using the cached values of SlateFontInfoStructs after updating a nested widget in UMG. This has been changed to get the value of SlateFontInfoStructs as required, first ensuring that the struct property handle is still valid.

[CL 2374699 by Jamie Dale in Main branch]
2014-12-03 09:01:34 -05:00
Mikolaj Sieluzycki
51f5333986 Prepare cpp files for header cleanup.
#codereview Robert.Manuszewski

[CL 2356864 by Mikolaj Sieluzycki in Main branch]
2014-11-12 04:58:53 -05:00
Jamie Dale
f7430ac704 Initial support for composite fonts for Slate, UMG, and Canvas
Slate now has the concept of composite fonts and font families (via FCompositeFont and FTypeface). A composite font is a font that contains a default font family, as well as any number of sub-font families which should be used for a given set of character ranges. This change will greatly improve the localization support for fonts.

UFont assets can now use two forms of caching "offline" (which is the way they have always worked historically), and "runtime" (which utilizes the Slate font cache to cache glyphs on demand). These runtime cached UFont assets are now the only way to specify which font to use for a UMG widget, and address the previous issues about ensuring that the required font files were staged for your game.

The Slate font cache now works on FFontData instances, rather than filenames. This allows the UFont asset to embed a blob of TTF or OTF font data inside it, rather than require the fonts be loaded from files on disk.

The Canvas text renderer has been updated to support runtime cached UFont assets. This gives our legacy Canvas based tools the same improved font localization support as the rest of the Slate-based editor UI.

UFont asset creation has been changed to use runtime caching by default, and additionally, you can now import a TTF or OTF file via the Content Browser and it will automatically create a UFont asset. If you still want an offline cached UFont asset, you can just change the cache type in the font editor, and the usual font picker dialog will appear and allow you to generate a font texture atlas.

[CL 2342203 by Jamie Dale in Main branch]
2014-10-28 09:02:03 -04:00