I use a special font known as Pigiarniq in a WPF application. I found that from time to time words will disappear from TextBlocks that use this font. Words that have disappeared will appear at the end of the line on which they are located, or perhaps on the next line, which makes me think that something is wrong with the text wrapper. I finally (after many difficulties) allocated the problem to a small piece of code (NOTE: this is only a test confirming the occurrence of the problem. This is not part of my program):
<Window x:Class="Test_the_textbox_width.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="850">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid
HorizontalAlignment="Center">
<TextBlock HorizontalAlignment="Left"
Name="textBlock1"
VerticalAlignment="Top"
FontFamily="Pigiarniq%20Regular.ttf#Pigiarniq"
TextWrapping="Wrap"
FontSize="15"
Margin="10">
<TextBlock.Text>
You do not need to enter both manually. Rates are calculated using true depositional
(uncompacted) thicknesses, rather than measured present-day thicknesses.
</TextBlock.Text>
</TextBlock>
</Grid>
</Grid>
"", "()", . , .
. TextBlock Grid , , TextBlock . InlineUIContainer. .
, , , , Loaded TextBlock:
private void textBlock1_Loaded(object sender, RoutedEventArgs e)
{
textBlock1.Width = textBlock1.ActualWidth;
}
! , ? , , ( , ). , Pigiarniq.