UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FontCacheHarfBuzz.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"
7
8class FFreeTypeFace;
10struct FSlateFontInfo;
11
12#ifndef WITH_HARFBUZZ
13 #define WITH_HARFBUZZ 0
14#endif // WITH_HARFBUZZ
15
16#ifndef WITH_HARFBUZZ_V24
17 #define WITH_HARFBUZZ_V24 0
18#endif // WITH_HARFBUZZ_V24
19
20#if PLATFORM_COMPILER_HAS_GENERIC_KEYWORD
21 #define generic __identifier(generic)
22#endif //PLATFORM_COMPILER_HAS_GENERIC_KEYWORD
23
24#if WITH_HARFBUZZ
26 #include "hb.h"
27 #include "hb-ft.h"
29#endif // #if WITH_HARFBUZZ
30
31#if PLATFORM_COMPILER_HAS_GENERIC_KEYWORD
32 #undef generic
33#endif //PLATFORM_COMPILER_HAS_GENERIC_KEYWORD
34
35namespace HarfBuzzUtils
36{
37
38#if WITH_HARFBUZZ
39
42
45
46#endif // #if WITH_HARFBUZZ
47
48} // namespace HarfBuzzUtils
49
51{
52public:
55
56#if WITH_HARFBUZZ
59
60#endif // WITH_HARFBUZZ
62 void Flush();
63
64private:
65 FFreeTypeCacheDirectory* FTCacheDirectory;
66
67#if WITH_HARFBUZZ && WITH_FREETYPE
68 class FFontKey
69 {
70 public:
72
73 bool operator==(const FFontKey& Other) const
74 {
75 return Face == Other.Face
76 && Flags == Other.Flags;
77 }
78
79 bool operator!=(const FFontKey& Other) const
80 {
81 return !(*this == Other);
82 }
83
84 friend inline uint32 GetTypeHash(const FFontKey& Key)
85 {
86 return Key.KeyHash;
87 }
88
89 private:
91 const int32 Flags;
92 uint32 KeyHash;
93 };
95#endif // WITH_HARFBUZZ && WITH_FREETYPE
96
97#if WITH_HARFBUZZ
99#endif // WITH_HARFBUZZ
100};
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
#define THIRD_PARTY_INCLUDES_START
Definition GenericPlatformCompilerPreSetup.h:63
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition FontCacheFreeType.h:533
Definition FontCacheFreeType.h:228
Definition FontCacheHarfBuzz.h:51
~FHarfBuzzFontCache()
Definition FontCacheHarfBuzz.cpp:464
Definition UnrealString.h.inl:34
Definition FontCacheHarfBuzz.cpp:61
Definition Voronoi.cpp:10
Definition SlateFontInfo.h:147