Font Issues February CTP

I am seeing a number of issues with fonts in the February CTP.

I cannot set certain font families. For example, I set Microsoft Sans Serif as the FontFamily of a MenuItem but the displayed FontFamily is Tahoma. FontSize is also always 11 no matter what I set.

I cannot set the FontWeight and FontStyle properties. For example, in the aforementioned MenuItem the displayed font is always bold.

When I set certain font families the display is corrupted. For example, Wingdings on GridViewColumnHeaders. Often the set column header text is absent. Other times painting of the column header is corrupted.


Answer this question

Font Issues February CTP

  • SC_Rambo

    I'm experiencing the same problems as Barry with my code also. The same code that works in the january ctp vis-a-vis fonts is not working with the february release. Im seeing the wrong font/size/weight for some fonts. As far as i can tell i havent installed the february release incorrectly, i uninstalled the old ctp according to the microsoft web page.

    Surely there must be other with this issue - im also having problems with the layout of panels not expanding to fill, has anything changed in the layout code


  • Dusan Kocurek

    Hi Chris,

    I created a style for a MenuItem setting the FontFamily, FontSize and FontWeight properties. For example,

    <Style x:Key="MenuItem">

    <Setter Property="FontFamily" value="Microsoft Sans Serif" />

    <Setter Property="FontSize" value="10pt" />

    <Setter Property="FontWeight" value="Normal" />

    </Style>

    I've tried setting these properties with the February CTP. I seem to be getting Tahoma, 11pt and Bold displayed.

    When I set Wingdings as the FontFamily property I find the MenuItems are corrupted visually. Other times the MenuItem text is just not painted.

    Unfortunately, I cannot point you to an image showing the problem as I'm not in work and won't be for two weeks now.

    My Regards,

    Barry


  • -lance

    Barry,

    Thanks for letting us know about these issues. Could you post a quick XAML blurb showing us what you're doing and seeing

    Thanks,

    Chris


  • Kim Meyer

    Hi Barry,

    Thanks for posting the XAML. I've run this in XAMLPad (available in the SDK) on a fresh x86 XP machine with Feb. CTP and cannot reproduce the problems you're experiencing. The xaml I pasted below looks to display correctly for me (the second line w/ Tahoma is slightly longer with a slight serif on the j).

    If this doesn't display correctly for you then my only guess is that the fonts or the WPF installed on your machine is somehow corrupted.

    <StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
    <StackPanel.Resources>
    <Style x:Key="MenuStyle" TargetType="{x:Type MenuItem}">
    <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
    <Setter Property="FontSize" Value="12pt" />
    <Setter Property="FontWeight" Value="Normal" />
    </Style>

    <Style x:Key="MenuStyle2" TargetType="{x:Type MenuItem}">
    <Setter Property="FontFamily" Value="Tahoma" />
    <Setter Property="FontSize" Value="12pt" />
    <Setter Property="FontWeight" Value="Normal" />
    </Style>
    </StackPanel.Resources>
    <Menu>
    <MenuItem Style="{StaticResource MenuStyle}" Header="The quick brown fox jumped">Hello World</MenuItem>
    </Menu>
    <Menu>
    <MenuItem Style="{StaticResource MenuStyle2}" Header="The quick brown fox jumped">Hello World</MenuItem>
    </Menu>
    </StackPanel>


  • justin tighe

    I have experienced numerous problems with the February CTP and it has actually prevented me from working. As a result I have uninstalled it and reinstalled the January CTP. Perhaps future CTPs will be more robust.

  • Marvin_ru

    Thanks Scott, this is quite concerning. Could paste the XAML you're using which worked on Jan. CTP but does not on Feb. CTP

    Thanks,
    Chris

  • Font Issues February CTP