I need to calculate italic text overhang in javascript. Here you can find picture what it means: ms knowledge base. I used the following link in order to calculate text width: Calculate text width with Javascript. I added mock div and measured text width, but the problem is that last symbol is sloped and if I use text width for right alignment last symbol upper part is outside of the desired box. I wonder if it's possible to calculate italic text angle of slope or the distance of the overhang in order to subtract this value and to get my text properly aligned in the box?
Asked
Active
Viewed 241 times
1
-
Seems like it equals 0.25em. http://bytes.com/topic/html-css/answers/548616-preventing-italics-text-hitting-next-character But I haven't found another proofs yet. – Access Denied May 28 '12 at 10:10