#266 – Specifying Values for FontSize
April 4, 2011 Leave a comment
When specifying character size using the FontSize property, you can express the font size in one of several different units.
- WPF device independent units (the default) – 1/96 in = 1 pixel at 96 dpi
- Points – Traditional metric for font size, 1/72 in
- Inches
- Centimeters
In all cases, the text will render at the requested size, regardless of the display device.
Here’s an example of several different font size values.
<Paragraph FontSize="8 pt">8 pt - Sphinx of black quartz</Paragraph> <Paragraph FontSize="10 pt">10 pt - Sphinx of black quartz</Paragraph> <Paragraph FontSize="12 pt">12 pt - Sphinx of black quartz</Paragraph> <Paragraph FontSize="13">13 units - Sphinx of black quartz</Paragraph> <Paragraph FontSize="16">16 units - Sphinx of black quartz</Paragraph> <Paragraph FontSize="0.2 in">0.2 in - Sphinx of black quartz</Paragraph> <Paragraph FontSize="0.5 cm">0.5 cm - Sphinx of black quartz</Paragraph> <Paragraph FontSize="32">32 units - Sphinx of black quartz</Paragraph>