- Graphics* context = gc->GetGraphics();
-
- Unit fontUnit = context->GetPageUnit();
- // if fontUnit is UnitDisplay, then specify UnitPixel, otherwise
- // you'll get a "InvalidParameter" from GDI+
- if ( fontUnit == UnitDisplay )
- fontUnit = UnitPixel;
-
- // NB: font unit should match context's unit. We can use UnitPixel,
- // as that is what the print context should use.
- Init(font.GetFaceName(), font.GetPointSize(), style, col, fontUnit);
+ Init(font.GetFaceName(), font.GetPointSize(), style, col);