forked from JuliaDocs/Documenter.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (JuliaDocs#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