fix type conversions in Glyph.ToBitmap