-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use JuliaMono, drop Google Fonts CDN (#1569)
- Loading branch information
Showing
9 changed files
with
162 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# Font demo | ||
|
||
```@example generate-font-example | ||
using Documenter.Utilities.DOM | ||
function font_demo_snippet(weight, style) | ||
@tags pre code div | ||
codeblock = pre(code[".language-julia-repl"](""" | ||
julia> for n in 0x2700:0x27bf | ||
Base.isidentifier(string(Char(n))) && print(Char(n)) | ||
end | ||
✀✁✂✃✄✅✆✇✈✉✊✋✌✍✎✏✐✑✒✓✔✕✖✗✘✙✚✛✜✝✞✟✠✡✢✣✤✥✦✧✨✩✪✫✬✭✮✯✰✱✲✳✴✵✶✷✸✹✺ | ||
✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞❟❠❡❢❣❤❥❦❧➔➕➖➗➘➙➚➛➜➝➞➟➠➡ | ||
➢➣➤➥➦➧➨➩➪➫➬➭➮➯➰➱➲➳➴➵➶➷➸➹➺➻➼➽➾➿ | ||
julia> ❤(s) = println("I ❤ \$(s)") | ||
❤ (generic function with 1 method) | ||
julia> ❤("Julia") | ||
I ❤ Julia | ||
""")) | ||
wrapping_div = if isnothing(weight) && isnothing(style) | ||
div | ||
else | ||
css_style = isnothing(weight) ? "" : "font-weight: $(weight);" | ||
css_style *= isnothing(style) ? "" : "font-style: $(style);" | ||
div[:style => css_style] | ||
end | ||
return wrapping_div(codeblock) | ||
end | ||
``` | ||
|
||
## Standard font | ||
|
||
```@example generate-font-example | ||
font_demo_snippet(nothing, nothing) | ||
``` | ||
|
||
## Different weights: `100:100:900` | ||
|
||
```@example generate-font-example | ||
font_demo_snippet(100, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(200, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(300, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(400, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(500, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(600, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(700, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(800, nothing) | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(900, nothing) | ||
``` | ||
|
||
## Italic & italic @ 900 | ||
|
||
```@example generate-font-example | ||
font_demo_snippet(nothing, "italic") | ||
``` | ||
```@example generate-font-example | ||
font_demo_snippet(900, "italic") | ||
``` | ||
|
||
## Unicode rendering | ||
|
||
Unicode rendering examples based on issues [#618](https://github.com/JuliaDocs/Documenter.jl/issues/618), [#1561](https://github.com/JuliaDocs/Documenter.jl/issues/1561). | ||
|
||
``` | ||
'∀' : Unicode U+2200 (category Sm: Symbol, math) | ||
ERROR: StringIndexError("∀ x ∃ y", 2) | ||
1 ⊻ 3: | ||
``` | ||
|
||
``` | ||
┌────────────────────────────────────────────────────────────────────────────┐ | ||
│ ┌───────────────┐ │ | ||
│ HTTP.request(method, uri, headers, body) -> │ HTTP.Response ├──────────────┼┐ | ||
│ │ └───────────────┘ ││ | ||
│ │ ││ | ||
│ │ ┌──────────────────────────────────────┐ ┌──────────────────┐ ││ | ||
│ └───▶│ request(RedirectLayer, ...) │ │ HTTP.StatusError │ ││ | ||
│ └─┬────────────────────────────────────┴─┐ └─────────▲────────┘ ││ | ||
│ │ request(BasicAuthLayer, ...) │ │ ││ | ||
│ └─┬────────────────────────────────────┴─┐ │ ││ | ||
│ │ request(CookieLayer, ...) │ │ ││ | ||
│ └─┬────────────────────────────────────┴─┐ │ ││ | ||
│ │ request(CanonicalizeLayer, ...) │ │ ││ | ||
│ └─┬────────────────────────────────────┴─┐ │ ││ | ||
│ │ request(MessageLayer, ...) ├─────────┼──────┐ ││ | ||
``` | ||
|
||
``` | ||
┌──────────────────────────────────────────────────────────────────────┐ | ||
1 │ ▗▄▞▀▀▀▀▀▀▀▄▄ │ | ||
│ ▄▞▘ ▀▄▖ │ | ||
│ ▄▀ ▝▚▖ │ | ||
│ ▗▞ ▝▄ │ | ||
│ ▞▘ ▝▚▖ │ | ||
│ ▗▀ ▝▚ │ | ||
│ ▞▘ ▀▖ │ | ||
│ ▗▞ ▝▄ │ | ||
│ ▄▘ ▚▖ │ | ||
│ ▗▞ ▝▄ │ | ||
│ ▄▘ ▚▖ │ | ||
│ ▗▀ ▝▚ │ | ||
│ ▗▞▘ ▀▄ │ | ||
│ ▄▀▘ ▀▚▖ │ | ||
0 │ ▄▄▄▄▀▀ ▝▀▚▄▄▄▖│ | ||
└──────────────────────────────────────────────────────────────────────┘ | ||
0 70 | ||
``` | ||
|
||
``` | ||
julia> pretty_table(data, display_size = (11,30)) | ||
┌────────┬────────┬────────┬── | ||
│ Col. 1 │ Col. 2 │ Col. 3 │ ⋯ | ||
├────────┼────────┼────────┼── | ||
│ 1 │ false │ 1.0 │ ⋯ | ||
│ 2 │ true │ 2.0 │ ⋯ | ||
│ 3 │ false │ 3.0 │ ⋯ | ||
│ ⋮ │ ⋮ │ ⋮ │ ⋱ | ||
└────────┴────────┴────────┴── | ||
1 column and 3 rows omitted | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters