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 8435853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:01:54+00:00 2026-06-10T07:01:54+00:00

I need to find exact size for each character in an arbitrary font. The

  • 0

I need to find exact size for each character in an arbitrary font.

The font is loaded using GlyphTypeface class.

The problem is that I can access directly only width of a glyph using the AdvanceWidths property, but the height is the same for each characters and it is set to Height property.

It seems that individual character height can be computed using a combination of Baseline, Height, XHeight, BottomSideBearings and TopSideBearings properties, but there is no documentation about real meaning of all these values. Baseline, Height and XHeight values are constant for the entire font, regarding other two – BottomSideBearings and TopSideBearings – I can’t find their meaning.

Generally speaking, is there any information how can be computed the size of an individual glyph from an arbitrary font? (having just the ‘TTF’ file, or anything else GlyphTypeface can be loaded from).

  • 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-06-10T07:01:55+00:00Added an answer on June 10, 2026 at 7:01 am

    After some research, found the right way to compute character size:

    var typeface = new GlyphTypeface(new Uri(fontpath));
    var character = 'W';
    var charIndex = typeface.CharacterToGlyphMap[character];
    
    var width = typeface.AdvanceWidths[charIndex];
    var height = typeface.Height - typeface.TopSideBearings[charIndex]
                                 - typeface.BottomSideBearings[charIndex];
    

    This will give the character size in em – to find real size it needs to be multiplied by the font size.

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

Sidebar

Related Questions

I can't really find the exact information that solves this quite common problem. I
I need to find a component's exact screen size in pixels when the main
actually I can not find an exact title for this problem. But I can
Need to find the exact size in bytes, occupied by a tree data structure
I need Exact size of File. is there anyway to find file size in
So I need to find an element in an iframe that is the exact
I need to find a silence in a mp3 file. Simple as that. For
I need to find a way to get actual page size in Google Chrome.
I need to find the longest sequence in a string with the caveat that
I need to find the mode EXE/DLL was build looking at its headers. (Using

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.