Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how many characters can fit in 1 line of div

CPL = W * fc / fs;
//CPL - characters per line
//W - width of area (pixels)
//fc - font constant (depends on font, ex- arial,sans serif is 1.91)
//fs - font size
 
PREVIOUS NEXT
Tagged: #characters #fit #line #div
ADD COMMENT
Topic
Name
7+5 =