- This topic is empty.
-
AuthorPosts
-
March 4, 2011 at 5:21 pm #31890
Keyamoon
MemberCheck this out (click on preview):
http://jsbin.com/ateji4/3/editI’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 #56551Keyamoon
Member“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 #56487Keyamoon
MemberThank you @wolfcry911 for sharing your results.
Here’s what I’ve got:
http://img156.imageshack.us/img156/7114/fontissue.jpgas 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 #54420bartv
ParticipantThe problem still exists. The line-box trick did not work.
March 23, 2011 at 10:46 am #54421jamygolden
ModeratorMake sure the fonts are installed on ubuntu.
August 6, 2012 at 5:31 am #107363autologica
Participanti added the following code to fix:
var os = navigator.platform.toLowerCase();
if( os.indexOf(‘mac’) != -1){
$(parentDivOfAnnoyingSpan).css({‘line-height’:’22px’});
} -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.