Skip to content

Commit 0efbc7b

Browse files
authored
Merge pull request #43 from asinghvi17/patch-1
Make broadcasting over FTFont easier
2 parents 03616e7 + f2e3f03 commit 0efbc7b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/types.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ function Base.getproperty(font::FTFont, fieldname::Symbol)
156156
end
157157
end
158158

159+
# Allow broadcasting over fonts
160+
Base.Broadcast.broadcastable(ft::FTFont) = Ref(ft)
161+
159162
get_pixelsize(face::FTFont) = getfield(face, :current_pixelsize)[]
160163

161164
function set_pixelsize(face::FTFont, size::Integer)

0 commit comments

Comments
 (0)