Segoe Script is another gorgeous OpenType font Microsoft is working on. Segoe Script supports automatic fraction formatting, another OpenType feature. The animation below illustrates the automatic formatting in Avalon, as the words “3/4 Cup Sugar” are typed:

An animation of the words '3/4 Cup Sugar' being typed

This formatting can be enabled through the Typography.Fractions property:

<TextFlow FontFamily="Segoe Script" FontSize="50" Typography.Fractions="Slashed">
  3/4 Cup Sugar
</TextFlow>

Unfortunately, most fonts only carry special characters for three common fractions: 1/4, 1/2, and 3/4.

Viewing 6 Comments

    • ^
    • v
    Unfortunately, most fonts not commissioned by Microsoft are PostScript based (including most OpenType fonts). And the current docs say you're not supporting these. So eventhough this is a really cool feature, I don't think this is going be very useful unless you're actually going to implement OpenType fully (that is, including CFF/PostScript support). Linotype Zapfino Extra would be an excellent showcase for OpenType features.
    • ^
    • v
    Unfortunately, most fonts not commissioned by Microsoft are PostScript based (including most OpenType fonts). And the current docs say you're not supporting these. So eventhough this is a really cool feature, I don't think this is going be very useful unless you're actually going to implement OpenType fully (that is, including CFF/PostScript support). Linotype Zapfino Extra would be an excellent showcase for OpenType features.
    • ^
    • v
    Although most fonts only contain pre-built fraction glyphs for ¼½ and ¾, newer OpenType fonts can build arbitrary fractions using contextual substitution and sets of numerator and denominator numerals. It works like this:

    Enter an arbitrary fraction, e.g. 7253735/89362529 and apply the Typography.Fractions property. If a font supports arbitrary fractions, the lookups will
    a) change all numerals in the string to numerator glyphs,
    b) change the slash glyph to a fraction bar,
    c) contextually change the numerator glyph that follows the fraction bar into a denominator glyph,
    d) contextually change any numerator glyph preceded by a denominator glyph to a denominator glyph.

    Et voila: one arbitrary fraction. Filipe, you can try this with any of the new ClearType collection fonts (Calibri, Cambria, Candara, Constantia, Corbel -- I'm can't remember if the monospaced Consolas font supports this layout feature or not).


    In reference to the preceding comment, I heard a rumour that MS and Adobe had come to an agreement re. CFF PostScript support in Avalon. Perhaps this is something that can now be officially confirmed or denied?
    • ^
    • v
    Although most fonts only contain pre-built fraction glyphs for ¼½ and ¾, newer OpenType fonts can build arbitrary fractions using contextual substitution and sets of numerator and denominator numerals. It works like this:

    Enter an arbitrary fraction, e.g. 7253735/89362529 and apply the Typography.Fractions property. If a font supports arbitrary fractions, the lookups will
    a) change all numerals in the string to numerator glyphs,
    b) change the slash glyph to a fraction bar,
    c) contextually change the numerator glyph that follows the fraction bar into a denominator glyph,
    d) contextually change any numerator glyph preceded by a denominator glyph to a denominator glyph.

    Et voila: one arbitrary fraction. Filipe, you can try this with any of the new ClearType collection fonts (Calibri, Cambria, Candara, Constantia, Corbel -- I'm can't remember if the monospaced Consolas font supports this layout feature or not).


    In reference to the preceding comment, I heard a rumour that MS and Adobe had come to an agreement re. CFF PostScript support in Avalon. Perhaps this is something that can now be officially confirmed or denied?
    • ^
    • v
    John: You're correct that the new fonts (except Consolas) do in fact support arbitrary fractions. The font I used in my example (Segoe Script), does not though.
    • ^
    • v
    John: You're correct that the new fonts (except Consolas) do in fact support arbitrary fractions. The font I used in my example (Segoe Script), does not though.

Trackbacks

close Reblog this comment
blog comments powered by Disqus