Skip to content

Commit 601130e

Browse files
authored
Update README example
1 parent 6f898ca commit 601130e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ using FreeTypeAbstraction
1414
face = FTFont("hack_regular.ttf")
1515

1616
# render a character
17-
img, metric = renderface(face, 'C')
17+
pixelsize = 10
18+
img, metric = renderface(face, 'C', pixelsize)
1819

1920
# render a string into an existing matrix
2021
myarray = zeros(UInt8, 100, 100)
21-
pixelsize = 10
2222
x0, y0 = 90, 10
23-
renderstring!(myarray, "hello", face, pixelsize, x0, y0, halign=:hright)
23+
renderstring!(myarray, "hello", face, pixelsize, y0, x0, halign=:hright)
2424
```
2525

2626
credits to @aaalexandrov from whom most of the early code comes.

0 commit comments

Comments
 (0)