Forums

Give help. Get help.

  • # March 4, 2011 at 5:21 pm

    Check this out (click on preview):
    http://jsbin.com/ateji4/3/edit

    I’m using a web font (@font-face) taken from google’s web font gallery. The text should be vertically centered as I have an equal padding on top and bottom. BUT it doesn’t look properly on linux/mac. I’ve tested it using both Chrome and Firefox:
    http://img156.imageshack.us/img156/7114/fontissue.jpg
    as you can see, Ubuntu does not include some of the pixels on top as part of the text and therefore, when adding 5px of padding to top and bottom, it doesn’t look centered.

    Have you seen this before? It happens for most of the custom fonts. This is very annoying and has made me go back to regular fonts a couple of times.

    I’d like to know, why this happens; and if there’s any solution for it.

    # March 4, 2011 at 9:23 pm

    “test-jump” didn’t change anything for me. windows is till showing it right, and linux is showing it the same as before.

    # March 5, 2011 at 8:04 am

    Thank you @wolfcry911 for sharing your results.

    Here’s what I’ve got:
    http://img156.imageshack.us/img156/7114/fontissue.jpg

    as you can see, Ubuntu does not include some of the pixels on top as part of the text and therefore, when adding 5px of padding to top and bottom, it doesn’t look centered.

    Hopefully it’s just me.

    # March 23, 2011 at 10:14 am

    The problem still exists. The line-box trick did not work.

    # March 23, 2011 at 10:46 am

    Make sure the fonts are installed on ubuntu.

    # August 6, 2012 at 5:31 am

    i added the following code to fix:

    var os = navigator.platform.toLowerCase();
    if( os.indexOf(‘mac’) != -1){
    $(parentDivOfAnnoyingSpan).css({‘line-height’:’22px’});
    }

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag