You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to render chemical formulas (via HTML Canvas fillText). Such formulas contain numeric subscripts to denote the multiplicity of an element: $H_2O$, $F_2$. The question is: how to compute ideal shifts for those subscripts, such that the subscript of F is rendered closer to the glyph than in the case of H. I believe fonts may contain some information about this. Could I (partially) solve this problem using OpenType.js?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need to render chemical formulas (via HTML Canvas fillText). Such formulas contain numeric subscripts to denote the multiplicity of an element:$H_2O$ , $F_2$ . The question is: how to compute ideal shifts for those subscripts, such that the subscript of
F
is rendered closer to the glyph than in the case ofH
. I believe fonts may contain some information about this. Could I (partially) solve this problem using OpenType.js?Beta Was this translation helpful? Give feedback.
All reactions