Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1022415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:27:43+00:00 2026-05-16T11:27:43+00:00

I am wracking my brains in trying to understand the discrepancy between the font

  • 0

I am wracking my brains in trying to understand the discrepancy between the font sizes users select or specify (for example, using a FontDialog) and the em-size reported by the Font class in .NET.

For example:

using (FontDialog dlg = new FontDialog()) {
    if (dlg.ShowDialog() == DialogResult.OK) {
        Console.WriteLine("Selected font size: " + dlg.Font.SizeInPoints.ToString("0.##"));
    }
}

Using the above code, you will get some confusing results:

Selecting 11 in the dialog produces 11.25

Selecting 12 in the dialog produces 12

Selecting 14 in the dialog produces 14.25

Selecting 16 in the dialog produces 15.75

This behaviour occurs regardless of the font you choose. As you can see from above, there is no pattern in the discrepancy, it seems to vary randomly between +0.25 and -0.25.

I get around this in user interfaces by only ever displaying the font size as a rounded whole number, but I swear that I have seen word processing/DTP packages that allow users to select fractional font sizes – and these packages do not show the above behaviour when interacting with Windows font dialog boxes.

Can anyone provide a rational explanation for this? Is there a best practice technique for displaying the font size in a UI? How about when the user wants a fractional size such as ‘10.5’?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:27:44+00:00Added an answer on May 16, 2026 at 11:27 am

    there is no pattern in the discrepancy

    As you can see, font sizes happen in increments of 0.75.

    Edit: You can fine tune sizes if you do not use the font dialog, but the results I suspect will be less pleasing than the ‘preferred’ sizes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I've been wracking my brains trying to figure this one out. I need
I'm trying to incorporate some Gravatar functionality using its XML-RPC API in an iPhone
I have been wracking my brain trying to figure this out. For the first
This is a seemlingly simple question, but I'm wracking my brain trying to figure
I have been wracking my brains for the whole day on this one. It
I have a SQL challenge that is wracking my brain. I am trying to
Wracking my brain this afternoon trying to figure this one out. I'm fairly new
When viewing my application thru Windows7 IE8, I noticed that the Font Size for
All, I have been trying to work out how to select say 15 tickets
I have been wracking my brain to come up with a solution to this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.