private Win32ObjectSafeHandle CreateGdiFont(RPLFormat.WritingModes writingMode, int fontSize, bool bold, bool italic, bool lineThrough, byte charset, bool verticalFont, string fontFamily) { int nEscapement = 0; int nOrientation = 0; if (this.VerticalMode) { if (!this.UseEmSquare) { if (writingMode == RPLFormat.WritingModes.Vertical) { nEscapement = 2700; nOrientation = 2700; } else { nEscapement = 900; nOrientation = 900; } } if (verticalFont) { fontFamily = "@" + fontFamily; } } return(Win32.CreateFont(-fontSize, 0, nEscapement, nOrientation, bold ? 700 : 400, (uint)(italic ? 1 : 0), 0u, (uint)(lineThrough ? 1 : 0), charset, 4u, 0u, this.m_fontQuality, 0u, fontFamily)); }