LuxDL / DocumenterVitepress.jl

Documentation with Documenter.jl and VitePress
https://luxdl.github.io/DocumenterVitepress.jl/
MIT License
64 stars 9 forks source link

Remove these space cadet fonts 🐵 #60

Closed asinghvi17 closed 4 months ago

asinghvi17 commented 4 months ago

Fixes #57

asinghvi17 commented 4 months ago

I just added JuliaMono as the monospace font. How does it look now?

lazarusA commented 4 months ago

It looks good.

Maybe we should add a one liner with several characters (most use ones) so we can see how they will be rendered. Doing help already gives some(may not enough):

 | | |_| | | | (_| |  |  Version 1.10.2 (2024-03-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

help?> 
search:  ] [ = $ ; ( @ { " ) ? . } ⊽ ⊼ ⊻ ⊋ ⊊ ⊉ ⊈ ⊇ ⊆ ≥ ≤ ≢ ≡ ≠ ≉ ≈ ∪ ∩ ∜ ∛ √ ∘ ∌

  Welcome to Julia 1.10.2. The full manual is available at

  https://docs.julialang.org

  as well as many great tutorials and learning resources:

  https://julialang.org/learning/

  For help on a specific function or macro, type ? followed by its name, e.g.
  ?cos, or ?@time, and press enter. Type ; to enter shell mode, ] to enter
  package mode.

  To exit the interactive session, type CTRL-D (press the control key together
  with the d key), or type exit().

No long ago I this one:

# by Lazaro Alonso
using DataFrames, CairoMakie, Unicode, Random
# Private Use Area
#https://juliamono.netlify.app

using REPL
REPL.REPLCompletions.latex_symbols["\\juliadots"] = "\ue800"
REPL.REPLCompletions.latex_symbols["\\makielogo"] = "\ue831"
REPL.REPLCompletions.latex_symbols["\\infinitylogo"] = "\ue817"
REPL.REPLCompletions.latex_symbols["\\catpiratelogo"] = "\ue838"
REPL.REPLCompletions.latex_symbols["\\julialogo"] = "\ue801"
REPL.REPLCompletions.latex_symbols["\\github"] = "\ue709"
REPL.REPLCompletions.latex_symbols["\\gitPR"] = "\ue726"
REPL.REPLCompletions.latex_symbols["\\gitcommit"] = "\ue729"
REPL.REPLCompletions.latex_symbols["\\gitCompare"] = "\ue728"
REPL.REPLCompletions.latex_symbols["\\gitMerge"] = "\ue727"
REPL.REPLCompletions.latex_symbols["\\gitBranch"] = "\ue725"
REPL.REPLCompletions.latex_symbols["\\symbolix"] = "\ue835"
REPL.REPLCompletions.latex_symbols["\\markdown"] = "\ue609"
REPL.REPLCompletions.latex_symbols["\\linux"] = "\ue712"
REPL.REPLCompletions.latex_symbols["\\creativecommons"] = "\ue789"

privateLogos = ["", "", "", "", ""] # they dont work as markers 
titlePrivate = " 🙭               ☣ 𝋮 ᛃ 🜟 🟕 ㊙ ㊗ ⏚ ⚗ ֎"
# to see the unicode values do '🟕'
#the valid Unicode code points are U+0000 through U+D7FF and U+E000 through U+10FFFF
df = DataFrame(s = String[], c = Char[])
unicodes = [0x2200:0x22FF,0x2A00:0x2AFF, 0x1D400:0x1D7FF, 0x2100:0x214F, 
      0x2700:0x27FF, 0x2900:0x297F, 0x2300:0x23F3, 0x25A0:0x25FF, 
      0x2B00:0x2B4C, 0x2B50:0x2B55] 
#not working properly  0x20D0:0x20F0, 0x2B00:0x2BFF, 0x2980:0x29FF, makie :( 
for unicode in unicodes 
      for n in unicode
            if Unicode.isassigned(Char(n))
                  push!(df, (string(n, base=16), Char(n)))
            end
      end
end
leesCommon = [0x2602, 0x20b4, 0x1685, 0x1f0a1, 0x281e]
for l in leesCommon
      push!(df, (string(l, base=16), Char(l)))
end
colors = ["#ff4500", "#6ee2ff", "#f7c530", "#95cc5e", "#d0dfe6", "#f79d1e", "#748aa6"]
Random.seed!(123)
with_theme(theme_black()) do 
      fig = Figure(resolution = (2560,1600), font = "JuliaMono")
      ax = Axis(fig, title = titlePrivate, titlesize = 80)
      k = 1
      for i in 1:81, j in 1:30
            try
                  scatter!(ax, [i], [j], marker = df.c[k], color = colors[rand(1:7)], markersize = 26)
            catch e
                  println("nope $(k)")
            end
            k += 1
            if k>size(df)[1]
                  break
            end
      end
      hidedecorations!(ax)
      hidespines!(ax, :b, :l, :r)
      xlims!(ax, 0,81)
      fig[1,1] = ax
      fig
      save("unicodes2.png", fig)
end
Random.seed!(123)
with_theme(theme_black()) do 
      fig = Figure(resolution = (4096,2304), font = "JuliaMono")
      ax = Axis(fig, title = titlePrivate, titlesize = 100)
      #ax2 = Axis(fig, bbox = BBox(3000, 4096, 2200, 2304))
      k = 1
      for i in 1:81, j in 1:30
            try
                  color = colors[rand(1:7)]
                  scatter!(ax, [i], [j], marker = df.c[k], color = color, markersize = 35)
                  text!(ax, df.s[k], position = (i, j - 0.5), color = color, 
                        textsize = 12, align = (:center, :center))
            catch e
                  println("nope $(k)")
            end
            k += 1
            if k>size(df)[1]
                  break
            end
      end
      text!(ax, "Visualization by @lazarusA", position = (74.9,-0.24), color = (:white,0.85), textsize = 20)
      text!(ax, "JuliaMono typeface", position = (0.75,-0.24), color = :white, textsize = 24)

      hidedecorations!(ax)
      #hidedecorations!(ax2)
      hidespines!(ax, :b, :l, :r)
      xlims!(ax, 0,81)
      ylims!(ax, -0.25,30.5)
      fig[1,1] = ax
      fig
      save("unicodesText.png", fig)
end

unicodesText

Moelf commented 1 month ago

image image

is |> also an instance of Space Mono font acting up?

asinghvi17 commented 1 month ago

Yes I think so. Not sure why this didn't transfer to template, maybe it just needs to be copied there...

avik-pal commented 1 month ago

We forgot to delete https://github.com/LuxDL/DocumenterVitepress.jl/blob/1860fc25a03d15c3a032362cfbaa64e64d58e642/template/src/.vitepress/theme/style.css#L1-L2

Moelf commented 1 month ago

https://github.com/LuxDL/DocumenterVitepress.jl/blob/1860fc25a03d15c3a032362cfbaa64e64d58e642/template/src/.vitepress/theme/style.css#L29

what about this