- int const minw = (w < 0) ? 3 * 8 : 4;
- dim.wid = max(minw, max(w, -w));
+ int const minw = (dim.wid < 0) ? 24 : 4;
+ dim.wid = max(minw, max(dim.wid, -dim.wid));
+
+ Length height = Length(to_ascii(getParam("height")));
+ height_ = height.inPixels(dim.height(), fm.width(char_type('M')));
+
+ // get the length of the parameters in pixels
+ Length offset = Length(to_ascii(getParam("offset")));
+ offset_ = offset.inPixels(max_width, fm.width(char_type('M')));
+
+ dim.asc = max(fm.maxAscent(), offset_ + height_);
+ dim.des = max(fm.maxDescent(), - offset_);