So, Iβm developing a site that will need to be used in many browsers, whether itβs a desktop, a mobile phone or whatever you have. Designers, as pop designers often do, used Helvetica Neue as the font for the entire site. I am trying to get it to work through @font inclusion, and it only shows perfectly .. but the line height gives me an ulcer.
See image below for Arial, Helvetica Neue Std and Helvetica Neue Pro. Windows Chrome treats all three as a champion, but the rest are wildly inconsistent here. Now they are all set to a linear height of 18px, I also tried the line-height: 1, but to no avail.

The HTML / CSS that I use for the purposes of this test:
<style type="text/css"> @font-face { font-family: "Helvetica Neue Std"; src: url( 'HelveticaNeueLTStd-Md.otf' ) format( "opentype" ); } @font-face { font-family: "Helvetica Neue Pro"; src: url( 'HelveticaNeueLTPro-Md.otf' ) format( "opentype" ); } .box { float: left; padding: 10px; border: 1px solid red; font-size: 18px; line-height: 18px; } .box .text_1 { font-family: Arial; } .box .text_2 { font-family: "Helvetica Neue Std" } .box .text_3 { font-family: "Helvetica Neue Pro" } </style> <div class="box"> <span class="text_1">Aw Nuts</span> </div> <div class="box"> <span class="text_2">Aw Nuts</span> </div> <div class="box"> <span class="text_3">Aw Nuts</span> </div>
Am I just out of luck? I'm considering using Arial at this point, because trying to create toolbars and buttons where the text is vertically centered is a nightmare. Of course, I do not want to sniff for the OS and browser and write my own line heights for each individual element.
Tathanen
source share