I'm very doubtful this is possible but I'd like to center a single letter (within a circle) considering only the horizontal edges of the glyph.
In particular the uppercase J
in Droid Sans is kerned such that the vertical bar is centered, but the tail extends out to the left. E.g. if you select the letter, the tail leaves the surrounding box.
I've tried all the CSS properties/values I could find, including font-kerning
and other CSS3 drafts, the ::first-letter
selector, etc. in Chrome and Firefox.
div {
font-family: "Droid Sans";
width: 50px;
height: 50px;
border-radius: 50%;
font-size: 40px;
line-height: 50px;
text-align: center;
background: #ddd;
}
div + div {
font-family: Arial
}
<head>
<link href="https://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet">
</head>
Droid Sans:
<div>J</div>
Arial (desired centering):
<div>J</div>