The Canvas API has several references into the metrics defined in
It also defines emHeightAscent and emHeightDescent but doesn't have a concrete definition for them. Talked with @jfkthame about what they might be defined as and currently thinking maybe we add in definitions for these for HTML to refer into, so all the related metrics are all defined in one place (even if CSS doesn't end up using this particular pair).
Proposed definition from me and @jfkthame is:
Roughly in code, something like:
if iTop | iBottom | iCentral:
/* rules of font format considers at least one of these defined */
if iBottom && !iTop:
iTop = iBottom + 1em;
if iTop && !iBottom:
iBottom = iTop - 1em;
if !iCentral:
iCentral = (iTop + iBottom)/2;
return (iCentral + 0.5em, iCentral - 0.5em);
else:
p = 1em/(ascent - descent);
return (ascent*p, descent*p);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3