I’m short on time, so here’s a quick screenshot and markup sample that illustrates the use of the Typography.NumeralStyle property (I’ve left it as an exercise to the reader to spot the difference between the two):

Using numerals in Avalon

<TextFlow xmlns="http://schemas.microsoft.com/winfx/avalon/2005" xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005" FontFamily="Pescadero" FontSize="30" TextAlignment="Right">
    <Paragraph><Inline Typography.NumeralStyle="Lining">1234567890</Inline>: Abcdefghij</Paragraph>
    <Paragraph><Inline Typography.NumeralStyle=" OldStyle">1234567890</Inline>: Abcdefghij</Paragraph>
</TextFlow>
Aside I’ve used Pescadero, an upcoming font by Ascender. We’re working with Ascender and hope to be able to include Pescadero, along with a few other OpenType fonts, in order to include these fonts in SDK under a license will allow developers to redistribute them with their Avalon based apps, something they can’t legally do with the other fonts supplied by Microsoft, or with most fonts acquired from third parties without a special license.

Viewing 4 Comments

    • ^
    • v
    That's great news about the font licensing if it goes ahead: I've been suffering serious font envy ever since I started reading your blog.

    As for the difference, I'm woefully ignorant of typography, but in the second example it looks as if the numerals are rendered as lower-case characters with acenders and descenders, and in the first example they're um, not.
    • ^
    • v
    Sorry, *ascenders (crap keyboard).
    • ^
    • v
    I use Windows XP SP-2 where I've installed the Avalon Beta 1 and the corresponding WinFX SDK. I'm testing the XAML samples in XAMLPad but somehow cannot get most of my system-installed fonts to show up in the XAML. works fine but does not (the font is, of course, installed in Windows XP's system folder. The only way I actually got Bickham Script Pro to render *somehow* in Avalon is but of course this is not the idea.

    Is there some additional magic I need to do so the XAMLPad output sees all the fonts installed on my system? Alternatively, is there a way to reference URIs in the FontFamily attribute?

    Adam
    • ^
    • v
    I figured it out. It worked when I specified "Bickham Script Pro Regular" instead of "Bickham Script Pro" as FontFamily. It looks that Avalon Beta 1 running in Windows XP SP-2 uses a different set of font names than Avalon running in Longhorn that you presumably use (name id 1 vs. 16). Might be worth looking at.

    Regards,
    Adam

Trackbacks

close Reblog this comment
blog comments powered by Disqus