def subscr(expr n) =
if numeric n: n elseif string n: ASCII n fi
enddef;
let BEGINCHAR = beginchar;
def beginchar(expr n, w, h, d) =
BEGINCHAR(n,(w)+(w)*(font_stretch-1)*char_stretch[subscr(n)],h,d)
enddef;
% this is for fonts based on exbase.mf which use
% beginchar_twice instead of beginchar
let BEGINCHAR_TWICE = beginchar_twice;
def beginchar_twice(expr n, w, h, d) =
BEGINCHAR_TWICE(n,(w)+(w)*(font_stretch-1)*char_stretch[subscr(n)],h,d)
enddef;