after some searching on the internet, I found this article
const float LocalOutlineSize = (float)(GetFont().OutlineSettings.OutlineSize);
// Account for the outline width impacting both size of the text by multiplying by 2
// Outline size in Y is accounted for in MaxHeight calculation in Measure()
const FVector2D ComputedOutlineSize(LocalOutlineSize * 2.f, LocalOutlineSize);
const FVector2D TextSize = FSlateApplication::Get().GetRenderer()->GetFontMeasureService()->Measure(BoundText.Get(), GetFont()) + ComputedOutlineSize + LocalShadowOffset;