October 2003
Intermediate to advanced
736 pages
15h 25m
English
Of course, deciding on a font is only half the fun. The real action is drawing strings after the font's been picked. For that, you use the DrawString method of the Graphics object:
Dim myfont As Font = New Font("Arial", 12)
' This will wrap at new line characters
g.DrawString("line 1" & vbCrLf & "line 2", myfont, _
Brushes.Black, 10, 10)
| Measure | Units | Example | Description |
|---|---|---|---|
| FontFamily.GetEmHeight | Design Units | 2,048 | Base size, equivalent to Size |
| FontFamily.GetCellAscent | Design Units | 1,854 | Height above base line |
| FontFamily.GetCellDescent | Design Units | 434 | Height below base line |
| FontFamily.GetLineSpacing | Design Units | 2,355 | CellAscent + CellDescent + Leading, normally about 115% of ... |
Read now
Unlock full access