Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ data/*.toml
data/*.aux
data/*/*-aux
data/*.log
data/*-aux.json
.fonts
static
public
Expand Down
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ AWK ?= awk
CMP ?= cmp
CURL ?= curl
GIT ?= git
GLU ?= glu
GROFF ?= groff
LUAROCKS ?= luarocks
MAGICK ?= magick
Expand All @@ -33,6 +34,8 @@ ZOLA ?= zola

BASE_URL = /

GLU_ARGS = -o $@ $<

GROFF_ARGS = -T pdf $< > $@
PAGEDJS_ARGS = -i $< -o $@

Expand Down Expand Up @@ -98,7 +101,7 @@ $(LUAMODLOCK): $(LUAROCKSMANIFEST) $(LUAMODSPEC)
$(genrockslock) > $@

.PHONY: fonts
fonts: .fonts/EgyptianOpenType.ttf
fonts: .fonts/EgyptianOpenType.ttf .fonts/LibertinusSerif-Regular.otf

.fonts:
mkdir -p $@
Expand All @@ -107,8 +110,26 @@ fonts: .fonts/EgyptianOpenType.ttf
$(CURL) -fsSL https://github.com/microsoft/font-tools/raw/main/EgyptianOpenType/font/eot.ttf -o $@
touch $@

.fonts/LibertinusSerif-Regular.otf: | .fonts
$(CURL) -fsSL https://github.com/alerque/libertinus/releases/download/v7.051/Libertinus-7.051.zip -o .fonts/libertinus.zip
cd .fonts && unzip -o -j -q libertinus.zip '*/static/OTF/LibertinusSerif-Regular.otf' '*/static/OTF/LibertinusSerif-Italic.otf' '*/static/OTF/LibertinusSerif-Bold.otf' '*/static/OTF/LibertinusMath-Regular.otf'
rm .fonts/libertinus.zip
touch $@

%-groff.pdf %-groff.toml: TYPESETTER_ARGS = $(call get_typesetter_args,content/$(notdir $(basename $*)).md,$(notdir $(basename $<)))

%-glu.pdf %-glu.toml: %/glu.md
local args="$(call get_typesetter_args,content/$(notdir $(basename $*)).md,$(notdir $(basename $<)))"
$(call make_manifest,$(GLU) $(TYPESETTER_ARGS) $(GLU_ARGS))

%-glu.pdf %-glu.toml: %/glu.html
local args="$(call get_typesetter_args,content/$(notdir $(basename $*)).md,$(notdir $(basename $<)))"
$(call make_manifest,$(GLU) $(TYPESETTER_ARGS) $(GLU_ARGS))

%-glu.pdf %-glu.toml: %/glu.lua
local args="$(call get_typesetter_args,content/$(notdir $(basename $*)).md,$(notdir $(basename $<)))"
$(call make_manifest,$(GLU) $(TYPESETTER_ARGS) $(GLU_ARGS))

%-groff.pdf %-groff.toml: %/groff.groff
$(call make_manifest,$(GROFF) $(TYPESETTER_ARGS) $(GROFF_ARGS))

Expand Down
2 changes: 1 addition & 1 deletion content/dropcaps.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Dropcaps"
description = "For that bold leading character"
extra.typesetters = [ "sile", "typst", "xelatex", "groff" ]
extra.typesetters = [ "sile", "typst", "xelatex", "groff", "glu" ]
+++

Once upon a time in a far away land all chapters began with these.
2 changes: 1 addition & 1 deletion content/hello-world.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Hello World!"
description = "Your most basic greeting."
extra.typesetters = [ "sile", "typst", "xelatex", "groff", "satysfi", "pagedjs", "weasyprint" ]
extra.typesetters = [ "sile", "typst", "xelatex", "groff", "satysfi", "pagedjs", "weasyprint", "glu" ]
+++

Just the simplest way to get a phrase onto a numbered page.
Expand Down
2 changes: 1 addition & 1 deletion content/hieroglyphs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Hieroglyphs"
description = "Language of the Pharaohs"
extra.typesetters = [ "sile", "typst" ]
extra.typesetters = [ "sile", "typst", "glu" ]
+++

In ancient times pictographs –wielded in the hands of the Pharaohs– ruled the world .
2 changes: 1 addition & 1 deletion content/integral-alignment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Alignment of Integrals"
description = "Compare the baseline alignment of integrals."
extra.typesetters = [ "typst", "sile", "xelatex" ]
extra.typesetters = [ "typst", "sile", "xelatex", "glu" ]
+++

Compare the baseline alignment of integrals.
Expand Down
2 changes: 1 addition & 1 deletion content/italic-correction.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Automated Italic Correction"
description = "Switching between italic and roman, and reciprocally"
extra.typesetters = [ "sile", "xelatex", "typst" ]
extra.typesetters = [ "sile", "xelatex", "typst", "glu" ]
+++

When an italicized word is followed or preceded by non-italicized text, the spacing may need to be adjusted, or “corrected”, so that the characters do not overlap.
Expand Down
2 changes: 1 addition & 1 deletion content/page-geometry.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Page Geometry 101"
description = "Pick a paper and some margins"
extra.typesetters = [ "sile", "typst", "xelatex", "groff", "pagedjs" ]
extra.typesetters = [ "sile", "typst", "xelatex", "groff", "pagedjs", "glu" ]
extra.typesetter_args = { groff = "-P-pA7" }
+++

Expand Down
2 changes: 1 addition & 1 deletion content/prime-symbol.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "The Prime Symbol"
description = "In math mode, prime-time is always a good time."
extra.typesetters = [ "typst", "sile", "xelatex", "groff" ]
extra.typesetters = [ "typst", "sile", "xelatex", "groff", "glu" ]
extra.typesetter_args = { groff = "-e -P-pA7" }
+++

Expand Down
2 changes: 1 addition & 1 deletion content/superscript.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Superscript"
description = "Those superior characters are not as simple as they seem"
extra.typesetters = [ "sile", "xelatex", "typst" ]
extra.typesetters = [ "sile", "xelatex", "typst", "glu" ]
+++

Superscripts are sometimes needed for numbers (e.g., in footnote calls), but also for letters (e.g., in French, for centuries, issue numbers; likewise in English —depending on authors— for centuries, etc.)
Expand Down
2 changes: 1 addition & 1 deletion content/title-case.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Title Case"
description = "Title casing prose is more complex than munging some glyphs."
extra.typesetters = [ "sile", "typst" ]
extra.typesetters = [ "sile", "typst", "glu" ]
+++

Coders have it easy.
Expand Down
2 changes: 1 addition & 1 deletion content/varlimits.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Variant limits"
description = "Those limits with a little extra flair"
extra.typesetters = [ "sile", "xelatex", "typst" ]
extra.typesetters = [ "sile", "xelatex", "typst", "glu" ]
+++

Variants for superior, inferior, projective, and injective limits are an interesting challenge for typesetting engines with mathematical capabilities.
Expand Down
2 changes: 1 addition & 1 deletion content/willans.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Willan’s Formula"
description = "An exact prime formula which is however quite insane and fairly useless."
extra.typesetters = [ "typst", "sile", "xelatex" ]
extra.typesetters = [ "typst", "sile", "xelatex", "glu" ]
+++

Willan's formula for the nth prime circa 1964; a.k.a. an exact prime formula which is quite insane and fairly useless but a nice typesetting stress test.
34 changes: 34 additions & 0 deletions data/dropcaps/glu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<head>
<style>
@page { size: A6; margin: 8mm; }
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Regular.otf");
}
body { font-family: "Libertinus Serif"; font-size: 10pt; line-height: 1.3; }
p { text-align: justify; margin: 0 0 0.9em 0; }
.two { initial-letter: 2; }
.three { initial-letter: 3; }
.smallcaps { font-feature-settings: "smcp" 1; }
</style>
</head>
<body>

<p class="two">This paragraph has a pretty plain initial or drop cap.
It uses the default document font. You didn't really expect more
detail with such a generic font choice, right? This may be exactly
what you want, especially with modern typesetting styles which tend
towards the minimalist.</p>

<p class="two">“Never <span class="smallcaps">say never,</span>” the
saying goes. Someday your dropcap may include leading punctuation.
No worries. The quotation mark hangs together with the letter.</p>

<p class="three">Another paragraph shows off a different line count.
This helps highlight the fact that the initial letter belongs to the
first word. The first line of text will be flush against the drop
cap, and so are the following lines that the initial spans.</p>

</body>
</html>
5 changes: 5 additions & 0 deletions data/hello-world/glu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<style>
@page { @bottom-center { content: counter(page); } }
</style>

Hello World
34 changes: 34 additions & 0 deletions data/hieroglyphs/glu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<head>
<style>
@page { size: A6; margin: 1cm; }
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Regular.otf");
}
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Italic.otf");
font-style: italic;
}
@font-face {
font-family: "Egyptian Text";
src: url("../../.fonts/EgyptianOpenType.ttf");
}
body { font-family: "Libertinus Serif"; font-size: 16pt; }
p { margin: 0; }
.label { border-bottom: 0.4pt solid black; padding-bottom: 0.1em; margin-bottom: 0.2em; }
.egy { font-family: "Egyptian Text"; font-size: 1.5em; margin-bottom: 0.6em; }
</style>
</head>
<body>
<p class="label"><i>mdw.t-km.t</i> ‘Egyptian language’</p>
<p class="egy">𓌃𓂧𓐰𓏏𓐱𓏯𓀁𓏪𓆎𓅓𓊖</p>

<p class="label"><i>nfr</i> ‘fine, beautiful’</p>
<p class="egy">𓄤𓆑𓐰𓂋</p>

<p class="label"><i>ḫprj</i> ‘Khepri’</p>
<p class="egy">𓆣𓐰𓂋𓇋𓁛</p>
</body>
</html>
18 changes: 18 additions & 0 deletions data/integral-alignment/glu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
math: true
---

<style>
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Regular.otf");
}
@font-face {
font-family: "Libertinus Math";
src: url("../../.fonts/LibertinusMath-Regular.otf");
}
body { font-family: "Libertinus Serif"; }
math { font-family: "Libertinus Math"; }
</style>

$$\sum_{k=0}^{\infty} \int_0^{\infty} e^{-kx^2} \mathrm{d}x$$
34 changes: 34 additions & 0 deletions data/italic-correction/glu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<head>
<style>
@page { size: A7; margin: 4mm; }
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Regular.otf");
}
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Italic.otf");
font-style: italic;
}
body { font-family: "Libertinus Serif"; font-size: 14pt; }
p { text-align: center; margin: 0.4em 0; }
.corr { -bag-italic-correction: auto; }
.label { text-align: left; font-size: 10pt; margin-top: 0.8em; }
</style>
</head>
<body>

<p class="label">No italic correction:</p>
<p>(<i>fluff</i>)</p>
<p>¡<i>fanciful proof</i>!</p>
<p>[<i>fluff</i>]</p>

<p class="label">With <code>-bag-italic-correction: auto</code>, a
heuristic kern from the boundary glyph's ink overhang:</p>
<p class="corr">(<i>fluff</i>)</p>
<p class="corr">¡<i>fanciful proof</i>!</p>
<p class="corr">[<i>fluff</i>]</p>

</body>
</html>
12 changes: 12 additions & 0 deletions data/page-geometry/glu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<html>
<head>
<style>
@page { size: A7; margin: 1cm; }
body { font-family: serif; }
p { text-indent: 1cm; text-align: justify; margin: 0; }
</style>
</head>
<body>
<p>An A7 page with 1cm margins and 1cm paragraph indentation.</p>
</body>
</html>
32 changes: 32 additions & 0 deletions data/prime-symbol/glu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
papersize: a6
math: true
---

<style>
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Regular.otf");
}
@font-face {
font-family: "Libertinus Math";
src: url("../../.fonts/LibertinusMath-Regular.otf");
}
body { font-family: "Libertinus Serif"; font-size: 11pt; }
math { font-family: "Libertinus Math"; font-size: 14pt; }
</style>

Math mode manners:

$$f(x) = a' + b'' + c'''$$

$$f'(x) = x^2 + 1$$

Prose poses problems:

60\*10'16"N 24\*55'52"E (plain)

60°10′16″N 24°55′52″E (unicode)

Markdown never turns straight quotes into smart quotes, so
feet, inches, minutes and seconds stay as typed.
21 changes: 21 additions & 0 deletions data/superscript/glu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<style>
@page { size: A7; margin: 4mm; }
@font-face {
font-family: "Libertinus Serif";
src: url("../../.fonts/LibertinusSerif-Regular.otf");
}
body { font-family: "Libertinus Serif"; font-size: 12pt; }
.sups { font-feature-settings: "sups" 1; }
.fake { vertical-align: super; font-size: 58%; }
.big { font-size: 20pt; }
</style>
</head>
<body>
<p style="font-size: 14pt">ther (not superscript)</p>
<p class="big">Xᵗʰᵉʳ (unicode superscript)</p>
<p class="big">X<span class="sups">ther</span> (font feature)</p>
<p class="big">X<span class="fake">ther</span> (scaled and raised)</p>
</body>
</html>
Loading
Loading