Решение простое — нужно создать на основе вашего текста геометрию и просто посмотреть ее границы:
var dpiX = 96.0 * VisualTreeHelper.GetDpi(this).DpiScaleX;
var formattedText =
new FormattedText(
MyTextBox.Text,
CultureInfo.GetCultureInfo("en-us"),
FlowDirection.LeftToRight,
new Typeface(
MyTextBox.FontFamily,
MyTextBox.FontStyle,
MyTextBox.FontWeight,
MyTextBox.FontStretch),
MyTextBox.FontSize,
Brushes.Black,
dpiX);
var geometry = formattedText.BuildGeometry(new Point());
var bounds = geometry.Bounds;
MessageBox.Show($"{bounds.Width}");

Полный код примера. Разметка:
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Viewbox>
<Canvas Name="MyCanvas">
<Path Name="MyPath" Stroke="Black" StrokeThickness="0.1"/>
<Path Stroke="Red" StrokeThickness="0.1" Opacity="0.5">
<Path.Data>
<RectangleGeometry x:Name="MyRect"/>
</Path.Data>
</Path>
</Canvas>
</Viewbox>
<StackPanel Grid.Row="1">
<TextBox Name="MyTextBox" Text="TT" Margin="0,5"/>
<Button Content="Click me" HorizontalAlignment="Center"
Padding="10,2" Click="Button_Click"/>
</StackPanel>
</Grid>
Кодбихайнд:
private void Button_Click(object sender, RoutedEventArgs e)
{
var dpiX = 96.0 * VisualTreeHelper.GetDpi(this).DpiScaleX;
var formattedText =
new FormattedText(
MyTextBox.Text,
CultureInfo.InvariantCulture,
FlowDirection.LeftToRight,
new Typeface(
MyTextBox.FontFamily,
MyTextBox.FontStyle,
MyTextBox.FontWeight,
MyTextBox.FontStretch),
MyTextBox.FontSize,
Brushes.Black,
dpiX);
var geometry = formattedText.BuildGeometry(new Point());
var bounds = geometry.Bounds;
MyCanvas.Height = formattedText.Height;
MyCanvas.Width = formattedText.Width;
MyPath.Data = geometry;
MyRect.Rect = bounds;
MessageBox.Show($"Ширина форматированного текста: {formattedText.Width}\nШирина границ: {bounds.Width}");
}