Skip to content

Commit 6822761

Browse files
committed
update
1 parent 7ba7c46 commit 6822761

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/FreeTypeExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function UnicodePlots.get_font_face(font = nothing, fallback = fallback_fonts())
103103
face
104104
end
105105

106-
UnicodePlots.save_png(args...; kw...) = FileIO.save(args...; kw...)
106+
UnicodePlots.save_image(args...; kw...) = FileIO.save(args...; kw...)
107107

108108
"""
109109
Match a font using the user-specified search string. Each part of the search string

ext/ImageInTerminalExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ UnicodePlots.sixel_encode(args...; kw...) = ImageInTerminal.sixel_encode(args...
1212
UnicodePlots.imshow(args...; kw...) = ImageInTerminal.imshow(args...; kw...)
1313

1414
function UnicodePlots.terminal_specs(img)
15+
char_h = char_w = nothing
1516
if ImageInTerminal.choose_sixel(img)
1617
ans = ImageInTerminal.Sixel.TerminalTools.query_terminal("\e[16t", stdout)
1718
if ans isa String && (m = match(r"\e\[6;(\d+);(\d+)t", ans)) nothing
1819
char_h, char_w = tryparse.(Int, m.captures)
19-
return char_h nothing && char_w nothing, char_h, char_w
2020
end
2121
end
22-
false, nothing, nothing
22+
char_h nothing && char_w nothing, char_h, char_w
2323
end
2424

2525
UnicodePlots.imageplot(img::AbstractArray{<:Colorant}; kw...) =

src/show.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ end
401401
# `FreeTypeExt` placeholders
402402
function get_font_face end
403403
function render_string! end
404-
function save_png end
404+
function save_image end
405405

406406
"""
407407
png_image(p::Plot, font = nothing, pixelsize = 32, transparent = true, foreground = nothing, background = nothing, bounding_box = nothing, bounding_box_glyph = nothing)
@@ -597,7 +597,7 @@ function savefig(p::Plot, filename::AbstractString; color::Bool = false, kw...)
597597
elseif ext == ".png"
598598
# `png_image` can fail if fonts are not found: a warning has already been
599599
# thrown there, so just bail out at this stage
600-
(img = png_image(p; kw...)) nothing && save_png(filename, img)
600+
(img = png_image(p; kw...)) nothing && save_image(filename, img)
601601
else
602602
"extension \"$ext\" is unsupported: `savefig` only supports writing to `txt` or `png` files" |>
603603
ArgumentError |>

0 commit comments

Comments
 (0)