I want to draw text on a Canvas that allow me to print the outline with one color and the inside using another color like this:
file:///Users/emile_schwarz/Downloads/Tim%20Tyler’s%20Luck%20-%20Le%20grand%20dossier/Tim%20Tyler’s%20Luck%20-The%20Complete%20data/Tim%20Tyler’s%20Luck%20-%20List%20of%20the%20Daily%20Strips%20(1928%20to%201999)%20-%20(copie)/images/Tim_Tylers_Luck.png
This was done using a special font in TextEdit, snapshot the text, Paste in Gimp and Buckled Blue and Red where they are, then Copy / Paste the result in a square in Preview.
For a one shot, it’s OK, but if I want a different Font and more than one shot…
Possible ? How ?
PS; Outline apparentmly does not works:
Sub Paint(g As Graphics, areas() As Rect) Handles Paint
g.FontSize = 24
g.DrawingColor = Color.Red
g.Outline = True
g.DrawText("This is an Outlined text.",10,20)
g.Outline = False
g.DrawingColor = Color.Black
g.DrawText("This is a Standard text.",10,50)
End Sub
// 1. Setup Font
g.FontName = "Arial"
g.FontSize = 60
g.Bold = True
Var t As String = "OUTLINED TEXT"
Var x As Integer = 50
Var y As Integer = 100
Var thickness As Integer = 2 // The thickness of your outline
// 2. Draw the "Outline" by offsetting the black text
g.DrawingColor = Color.Black
// Draw in 4 directions to create a solid border
g.DrawText(t, x - thickness, y) // Left
g.DrawText(t, x + thickness, y) // Right
g.DrawText(t, x, y - thickness) // Top
g.DrawText(t, x, y + thickness) // Bottom
// Optional: Draw diagonals for a smoother corner at large sizes
g.DrawText(t, x - thickness, y - thickness)
g.DrawText(t, x + thickness, y + thickness)
g.DrawText(t, x - thickness, y + thickness)
g.DrawText(t, x + thickness, y - thickness)
// 3. Draw the main "Fill" text
g.DrawingColor = Color.Red
g.DrawText(t, x, y)