Jump to content

correct vertical allign


Yehuda Katz
 Share

Recommended Posts

Hello,

I tried many different ways but cannot make text appear vertically centered. Anchor is working fine, the problem is within font itself. When I use number as text, there is invisible space (I can see that if I set background color) bellow base line (for example letter g). However in my case this is critical, because number (score) is shown within small circle and must be ideally centered.

1) The complicated solution could be getting actual text height by scanning canvas' pixels. However, this may be time consuming.

2) Currently the only fast solution seems to be, creation of BitMap font with numbers.

Is there any better solution than this?

Thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...