Skip to content

Commit

Permalink
Added loadfont() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jheinen committed Mar 16, 2021
1 parent d86c76a commit c01c041
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/GR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export
inqtext3d,
settextencoding,
inqtextencoding,
loadfont,
# Convenience functions
jlgr,
colormap,
Expand Down Expand Up @@ -4144,6 +4145,15 @@ function inqtextencoding()
return encoding[1]
end

function loadfont(name::String)
font = Cint[0]
ccall( (:gr_loadfont, libGR),
Cstring,
(Cstring, Ptr{Cint}),
name, font)
return Int(font[1])
end

# JS functions
include("js.jl")

Expand Down

0 comments on commit c01c041

Please sign in to comment.