Reputation: 28621
I've set up a page to demonstrate the issue (please see): http://www.vdovgan.ru/font-issue/
I'm using a custom font for a block-level element.
The problem is that this font is stuck to the top of the box in Google Chrome on my Linux machine. On the Windows machine and the same browser it sits just right in the vertical center of the bounding box (just as expected).
The question is: why it's displaced on my Linux machine?
I'm using Google Chrome Version 24.0.1312.57 on my Linux machine and Google Chrome Version 24.0.1312.57 m on my Windows machine.
Upvotes: 0
Views: 164
Reputation: 1796
The render engine for Chrome in Windows and Linux are different. I would setup a test in javascript to tell what browser it is and adding some padding.
UserAgent result for linux "Mozilla/5.0 (X11; CrOS x86_64 2913.331.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.111 Safari/537.11"
This is a javascript example:
if ((navigator.userAgent.indexOf('Chrome') && navigator.userAgent.indexOf('Gecko')) != -1)
{
// add some padding via javascript because it is using the Gecko engine
}
Upvotes: 1