FontStyle fs = 0;
Graphics g = Graphics.FromImage(bmp); 
Font a = new Font(this.SelectedFontFamily, 150, fs);
Brush b=Brushes.Black;       
g.DrawString("", a, b, new PointF(10, 10));

解决方案 »

  1.   

    用一下UBB你需要保留格式的地方。
      

  2.   


    以下是示例代码,要稍作改造,
    Protected override void OnPaint(PaintEventArg e)
    {    
        m_StringFormat=new StringFormat();
        m_StringFormat.FormatFlags|=SringFormat.NoWrap;
        m_StringFormat.FormatFlags|=SringFormat.MeasureTrailingSpace;    RectangleF rectF=new RectangleF(ClientRectangle.Left+x,ClientRectangle.Top+y,sizeF.Width,sizeF.Height);
        SolidBrush brushFont=new SolidBrush(ForeColor);
        e.Graphics.DrawString("你要绘制的文字",Font,brushFont,rectF,m_StringFormat);
        brushFont.Dispose();
    }
      

  3.   

    看看这个例子 
    自绘文字
    http://blog.csdn.net/jianuMan/archive/2010/06/19/5680535.aspx你肯定有不规则图形边框的坐标信息。 你推算出每一行起点坐标和终点坐标,由此算出可以显示多少个文字,从哪个点开始显示。你可以依据字体大小,算出文字高度为多少像素
    每次paint 的时候将文字按照预先算出的坐标信息 DrawString一次。
    就可以了