Menu

#13 Font class

open
nobody
None
5
2011-03-29
2010-11-06
No

Well it so happens when i was creating my widgets library from scratch I found out that when you want to get the width of the font string...it only gets the uppercase letters width rather then the lower case letters width when i use the letter "j" it reads it as "J" instead...here is my example of my code where I've encountered it:

Code:
Private Sub SetWidthCursorLoc(ByVal Positive As Boolean)
If Positive Then
If Text.Length > WidthCursorPos Then
WidthCursorPos += 1
Dim s As String = Text(WidthCursorPos - 1).ToString()
WidthCursorRealPos += m_Font.SizeText(s.ToLower).Width
End If
Else
If WidthCursorPos > 0 Then
WidthCursorPos -= 1
WidthCursorRealPos -= m_Font.SizeText(Text(WidthCursorPos).ToString()).Width
End If
End If
End Sub

It would be quite nice if someone could get this fixed up soon.
Thanks,
StormShell

Discussion

  • Stefan Ekman

    Stefan Ekman - 2011-03-29
    • status: open --> wont-fix
     
  • Stefan Ekman

    Stefan Ekman - 2011-03-29
    • status: wont-fix --> open
     

Log in to post a comment.