How could I deactivate kerning for my font?
Try text-rendering: optimizeSpeed
, this disables kerning at least on my browser.
That is to say, "VA".width == "V".width + "A".width
.
letter-spacing
does not disable kerning, "VA" is still shorter than "V" + "A".
So, try text-rendering
. Though it gets a worse text rendering, it does disable kerning.
CSS controls kerning with the letter-spacing attribute. Try setting it to 0 to return the font to it's normal kerning.
p { letter-spacing: 0; }
Use letter-spacing property
<style>
.kern
{
letter-spacing: 10px;
}
.nokern
{
letter-spacing: 0px;
}
</style>
<div id="div1" class="kern">
test test test test
</div>
<div id="div2" class="nokern">
test test test test
</div>
See the kerning concept at Wikipedia.
Kerning is not controlled by letter-spacing, and there are no font-kerning
for CSS1 or CSS2. The new specification, CSS3, has not been approved as a standard (W3C Recommendation), but there are a property proposed for font-kerning
, see 2012 draft,
http://www.w3.org/TR/css3-fonts/#font-kerning-prop
Only specific fonts, like OpenFonts, have this property.
Even with no kerning control, the use of a non-zero letter-spacing can change the "human kerning perception", producing a "deactivate kerning" effect. Example: enhance kerning with letter-spacing:-0.1em
and lost with letter-spacing:0.5em
.
With CSS1 letter-spacing
property you can lost or enhance kerning perception, and into a "letter-spaced text" you can simulate kerning:
<div style="font-size:20pt;background-color:#bcd">
VAST <small>(normal)</small>
<br/>
<span style="letter-spacing:-0.1em">VAST</span>
<small>(enhance perception)</small>
<br/>
<span style="letter-spacing:0.5em">VAST</span>
<small>(lost perception)</small>
<br/>
<!-- SIMULATE KERNING AT SPACED TEXT -->
<div style="letter-spacing:6pt">
SIMULATE: <span style="letter-spacing:4pt">VA</span>ST TEXT
</div>
</div>
See the above example here.
I don't know if this is exactly possible, but you could try to look at the letter-spacing property.