locked
Font Size in Intellipad RRS feed

  • Question

  • This is a fairly dumb question, but was curious about it: When tweaking the font size in Intellipad, by editing ClassificationFormats.xcml, in what unit should the value for the FontSize attribute be specified?

    The reason I bring it up is that, while tweaking the settings, I realized that using the same font family and size I usually use in Visual Studio yields a much smaller font size in Intellipad.

    For example, using Envy Code R as my font, I'd normally use size 13 in Visual Studio 2008, but to get the exact same text size in Intellipad, I have to jack it up to size 16.

    http://winterdom.com/
    Wednesday, March 25, 2009 12:54 PM

Answers

  • Hi Tomas,

    I'm not an expert on WPF and fonts, but WPF specifies coordinates as if they were 96 dpi, regardless of the actual screen resolution.  Typographic points, however, are specified in units of 1/72" rather than 1/96". There is this 4/3 factor to convert between WPF and Typographical, and that sounds like it is about right foe what you see.

    If the screen is not really 96 dpi (but the screen properties are correctly set to the actual resolution) then the resulting point size should be correct anyway.

    See e.g. Charles Petzold, Applications = Code + Markup, p.47 for a description - hope that helps.

    --david

    Wednesday, March 25, 2009 4:10 PM

All replies

  • Hi Tomas,

    I'm not an expert on WPF and fonts, but WPF specifies coordinates as if they were 96 dpi, regardless of the actual screen resolution.  Typographic points, however, are specified in units of 1/72" rather than 1/96". There is this 4/3 factor to convert between WPF and Typographical, and that sounds like it is about right foe what you see.

    If the screen is not really 96 dpi (but the screen properties are correctly set to the actual resolution) then the resulting point size should be correct anyway.

    See e.g. Charles Petzold, Applications = Code + Markup, p.47 for a description - hope that helps.

    --david

    Wednesday, March 25, 2009 4:10 PM
  • Thanks David, that makes sense (I guess, since I'm still using 96dpi). I don't know much about WPF as UI is really not my strong suit :)

    Definitely something I'll want to keep in mind on my powershell script then! :)

    http://winterdom.com/
    Wednesday, March 25, 2009 4:12 PM
  • Thursday, March 26, 2009 7:02 PM