Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify & fix README example #80

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ Draw text into a Matrix.

using FreeTypeAbstraction

# load a font
face = FTFont("hack_regular.ttf")
# search for a font on your system
# Choose the name of a font you have installed
face = findfont("arial") # if this returns `nothing`, that means it could not find the font

# render a character
img, metric = renderface(face, 'C')
img, metric = renderface(face, 'C', 100)

# render a string into an existing matrix
myarray = zeros(UInt8, 100, 100)
Expand Down
Loading