Skip to content

Commit

Permalink
add font info
Browse files Browse the repository at this point in the history
  • Loading branch information
cormullion committed Jan 12, 2024
1 parent 3f7776b commit 567ac1c
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ makedocs(
"Perfect pixels and antialising" => "explanation/perfectpixels.md",
"Transforms and matrices" => "explanation/transforms.md",
"Image matrix" => "explanation/imagematrix.md",
"Fonts on Linux" => "explanation/fonts.md",
"Luxor and Cairo" => "explanation/luxorcairo.md",
"Customize strokepath/fillpath" => "explanation/strokepathdispatch.md",
"Contributing" => "explanation/contributing.md"
Expand Down
110 changes: 110 additions & 0 deletions docs/src/explanation/fonts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
```@meta
DocTestSetup = quote
using Luxor, Colors
end
```

# Fonts available on Linux CI systems

```@raw html
<details closed><summary>Code for this figure</summary>
```

This code generates the figure below.

```@example fonts
using Luxor
fonts = ["Lato-Hairline",
"Lato-Hairline",
"Lato-HairlineItalic",
"Lato-Thin",
"Lato-ThinItalic",
"Lato-Light",
"Lato-LightItalic",
"Lato-Semibold",
"Lato-SemiboldItalic",
"Lato-Bold",
"Lato-BoldItalic",
"Lato-Italic",
"Lato-Regular",
"Lato-RegularItalic",
"Lato-Medium",
"Lato-MediumItalic",
"Lato-Heavy",
"Lato-HeavyItalic",
"Lato-Black",
"Lato-BlackItalic",
#
"LiberationMono-Regular",
"LiberationMono-Bold",
"LiberationMono-BoldItalic",
"LiberationMono-Italic",
#
"LiberationSans-Regular",
"LiberationSans-Bold",
"LiberationSans-BoldItalic",
"LiberationSans-Italic",
#
"LiberationSansNarrow-Regular",
"LiberationSansNarrow-Bold",
"LiberationSansNarrow-BoldItalic",
"LiberationSansNarrow-Italic",
#
"LiberationSerif-Regular",
"LiberationSerif-Italic",
"LiberationSerif-Bold",
"LiberationSerif-BoldItalic",
# "DejaVuMathTeXGyre",
"DejaVuSans",
"DejaVuSans-ExtraLight",
"DejaVuSans-Bold",
"DejaVuSans-BoldOblique",
"DejaVuSans-Oblique",
#
"DejaVuSansCondensed",
"DejaVuSansCondensed-Oblique",
"DejaVuSansCondensed-Bold",
"DejaVuSansCondensed-BoldOblique",
#
"DejaVuSansMono",
"DejaVuSansMono-Bold",
"DejaVuSansMono-BoldOblique",
"DejaVuSansMono-Oblique",
#
"DejaVuSerif",
"DejaVuSerif-Italic",
"DejaVuSerif-Bold",
"DejaVuSerif-BoldItalic",
"DejaVuSerifCondensed",
"DejaVuSerifCondensed-Italic",
"DejaVuSerifCondensed-Bold",
"DejaVuSerifCondensed-BoldItalic",
]
function drawfonts()
d = @drawsvg begin
background("black")
fontsize(20)
sethue("white")
table = Table(length(fonts), 2, 50, 40)
n = 1
for font in fonts
text(font, table[n], halign=:right)
@layer begin
fontface(font)
text(font, table[n+1])
end
n += 2
end
end 900 2400
return d
end
```

```@raw html
</details>
```

```@example fonts
drawfonts()
```

0 comments on commit 567ac1c

Please sign in to comment.