I have found that at least one ttf font vanishes in WPF (4.0) when its text size is 100 or higher. Is this a known bug?
E.g.
This can be seen:
<TextBlock x:Name="tb" FontFamily="Roboto" FontSize="99" Text="abcdef" HorizontalAlignment="Left" VerticalAlignment="Top" />
This can't:
<TextBlock x:Name="tb" FontFamily="Roboto" FontSize="100" Text="abcdef" HorizontalAlignment="Left" VerticalAlignment="Top" />
This also applies when the text is enlarged through render transforms:
This can be seen:
<Grid Height="200">
<TextBlock x:Name="tb" FontFamily="Roboto" FontSize="50" Text="abcdef" />
<Grid.RenderTransform>
<ScaleTransform ScaleX="1.9999" />
</Grid.RenderTransform>
</Grid>
But this can't:
<Grid>
<TextBlock x:Name="tb" FontFamily="Roboto" FontSize="50" Text="abcdef" />
<Grid.RenderTransform>
<ScaleTransform ScaleX="2" />
</Grid.RenderTransform>
</Grid>
The textblock:
1)Still arranges fine, and has appropriate actualheight and actualwidth values.
2)Has normal opacity and visibility values
3)If it has a background, the background appears fine/right size etc.
Also worth noting:
1)This font is by google and seems to work just fine otherwise. I've even opened it in a font editor and it seems normal
2)This is a TTF font
3)The font works fine in MS word etc at all font sizes BUT
4)If you publish an Ms Word file with this font at a large size to XPS, the font is invisible in the XPS doc (selectable, but not visible. As though it's opacity is 0)
4)This applies to content controls and textboxes too
The reason I don't just 'pick another font' is because my program uses a LOT of fonts like this. I can't manually check each one!
Has anyone seen this before? Any ideas?
The font can be downloaded from
here[
^]