UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateTextShaper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Fonts/FontCache.h"
10
13class IBreakIterator;
14
57
58
64{
65public:
67
69
71
73 void FlushCache();
74
75private:
76 void PerformTextShaping(const TCHAR* InText, const int32 InTextStart, const int32 InTextLen, const FSlateFontInfo& InFontInfo, const float InFontScale, const TextBiDi::ETextDirection InTextDirection, const ETextShapingMethod TextShapingMethod, TArray<FShapedGlyphEntry>& OutGlyphsToRender);
77
79
80#if WITH_FREETYPE
82#endif // WITH_FREETYPE
83
84#if WITH_HARFBUZZ
86#endif // WITH_HARFBUZZ
87
89
90 FFreeTypeCacheDirectory* FTCacheDirectory;
91 FCompositeFontCache* CompositeFontCache;
92 FSlateFontRenderer* FontRenderer;
93 FSlateFontCache* FontCache;
94
96 TUniquePtr<TextBiDi::ITextBiDi> TextBiDiDetection;
97
99 TSharedRef<IBreakIterator> GraphemeBreakIterator;
100
101#if WITH_HARFBUZZ
104#endif // WITH_HARFBUZZ
105};
FPlatformTypes::int16 int16
A 16-bit signed integer.
Definition Platform.h:1123
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ETextShapingMethod
Definition FontCache.h:52
EFontRasterizationMode
Definition FontRasterizationMode.h:11
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition FontCacheCompositeFont.h:203
Definition FontCacheFreeType.h:533
Definition FontCacheHarfBuzz.h:51
Definition SlateTextShaper.h:19
TWeakPtr< FFreeTypeFace > FontFace
Definition SlateTextShaper.h:40
EFontRasterizationMode RasterizationMode
Definition SlateTextShaper.h:52
FShapedGlyphFaceData(TWeakPtr< FFreeTypeFace > InFontFace, const uint32 InGlyphFlags, const float InFontSize, const float InFontScale, const float InFontSkew, const EFontRasterizationMode InRasterizationMode, const int16 InSdfPpem)
Definition SlateTextShaper.h:21
float BitmapRenderScale
Definition SlateTextShaper.h:48
float FontSkew
Definition SlateTextShaper.h:50
int16 SdfPpem
Definition SlateTextShaper.h:54
float FontScale
Definition SlateTextShaper.h:46
float FontSize
Definition SlateTextShaper.h:44
uint32 GlyphFlags
Definition SlateTextShaper.h:42
Definition FontCache.h:756
Definition SlateFontRenderer.h:58
Definition SlateTextShaper.h:64
void FlushCache()
Definition SlateTextShaper.cpp:116
FShapedGlyphSequenceRef ShapeUnidirectionalText(const TCHAR *InText, const int32 InTextStart, const int32 InTextLen, const FSlateFontInfo &InFontInfo, const float InFontScale, const TextBiDi::ETextDirection InTextDirection, const ETextShapingMethod TextShapingMethod)
Definition SlateTextShaper.cpp:139
FShapedGlyphSequenceRef ShapeBidirectionalText(const TCHAR *InText, const int32 InTextStart, const int32 InTextLen, const FSlateFontInfo &InFontInfo, const float InFontScale, const TextBiDi::ETextDirection InBaseDirection, const ETextShapingMethod TextShapingMethod)
Definition SlateTextShaper.cpp:123
Definition IBreakIterator.h:9
Definition Array.h:670
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition UniquePtr.h:107
Definition SharedPointer.h:1295
UE_FORCEINLINE_HINT TSharedPtr< ObjectType, Mode > Pin() const &
Definition SharedPointer.h:1512
ETextDirection
Definition Text.h:1413
Definition FontCache.h:337
Definition SlateFontInfo.h:147