M
Mike Grace
Hi,
I am printing a line of text which uses 2 different fonts. It is actually
broken into 2 and drawn separately. Because one font is bigger than the
other, I need to align the smaller font onto the same base line as the
larger font.
By getting the ascent of each font and obtaining the difference, I thought I
could add it onto the smaller fonts y position thus aligning the font.
The trouble is the font metric GetCellAscent() returns "design units"
(whatever they are) but my page is in inches. (This seems odd because I can
pass my Graphics object to the getHeight() method and get that returned in
inches.
How can I convert design units to inches or pixels or any of the other units
that a Graphics object can have?
Is there a conversion function? I cannot find anything in the msdn docs.
Can anyone help?
Mike
I am printing a line of text which uses 2 different fonts. It is actually
broken into 2 and drawn separately. Because one font is bigger than the
other, I need to align the smaller font onto the same base line as the
larger font.
By getting the ascent of each font and obtaining the difference, I thought I
could add it onto the smaller fonts y position thus aligning the font.
The trouble is the font metric GetCellAscent() returns "design units"
(whatever they are) but my page is in inches. (This seems odd because I can
pass my Graphics object to the getHeight() method and get that returned in
inches.
How can I convert design units to inches or pixels or any of the other units
that a Graphics object can have?
Is there a conversion function? I cannot find anything in the msdn docs.
Can anyone help?
Mike