cap-height icon indicating copy to clipboard operation
cap-height copied to clipboard

Cap-Width

Open glennphilp opened this issue 7 years ago • 1 comments

Hey @sebdesign, is there a way to get the character width for a font using your cap-height JS?

I am wanting to easily calculate the max-width of a paragraph/line-of-text should be based on characters per line, font-size, and character width.

Thank you for this awesome tool!

glennphilp avatar Aug 22 '16 21:08 glennphilp

Hello @glennphilp ,

I'm sorry for never replying to your issue. About the glyph width, that would be more tricky. For proportionate-width typefaces, we would have to calculate the average or the median of all the character widths.

I'll see what I can do, but maybe it would be more suitable for a new package.

sebdesign avatar Feb 19 '17 11:02 sebdesign