The problem on the font of Korean

Discussion in 'ASP.NET / ASP.NET Core' started by jamijoa, Jan 7, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Fisrt, I can't use English well.Sorry.

    ^^;

    Our site is Korean site.
    We have the program to convert the text to the image.
    But we do not go well.
    The letter all is seen as the square.(Font Problem??)


    Please!! gives the resolution.

    view this problem
    http://www.rikkyouniv.net/_Tools/Read_Mail.aspx?UserId=karma&MgId=7A1E85395F356B6DFB687506D0730150

    the code
    ====================================
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim UserId As String
    Dim MgId As String

    UserId = Request.QueryString("UserId")
    MgId = Request.QueryString("MgId")


    Dim _dbconn As New RikkyoUniv.DbConn
    Dim stc_db As RikkyoUniv.Stc.stc_SqlDb
    _dbconn.Active(stc_db)
    stc_db.DbCommand.CommandType = CommandType.StoredProcedure
    stc_db.DbCommand.CommandText = "Pr_Read_KoreanMail"
    stc_db.DbCommand.Parameters.Add("@UserId", SqlDbType.VarChar).Value = UserId
    stc_db.DbCommand.Parameters.Add("@MgId", SqlDbType.VarChar).Value = MgId

    stc_db.DbReader = stc_db.DbCommand.ExecuteReader

    If stc_db.DbReader.Read Then
    Write_Text((stc_db.DbReader("MailContent")))

    End If

    _dbconn.deActive(stc_db)
    End Sub

    Private Sub Write_Text(ByVal Str As String)

    Dim bmp As Bitmap = New Bitmap(300, 400)
    Dim g As Graphics = Graphics.FromImage(bmp)
    g.Clear(Color.White)


    Dim f As Font = New Font("gulim", 8)

    Dim mybrush As SolidBrush = New SolidBrush(Color.Black)

    g.DrawString(Str, f, mybrush, 0, 0)

    Response.Clear()
    Response.ContentType = "image/gif"
    bmp.Save(Response.OutputStream, Imaging.ImageFormat.Gif)

    bmp.Dispose()
    g.Dispose()


    End Sub
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page