content/blog/second-post.smd
59 lines · 1890 bytes
1---
2.title = "Second Post",
3.date = .date("1990-01-02T00:00:00"),
4.layout = "post.shtml",
5---
6
7This second post is mainly here to show you that you can also create single file
8posts for convenience. The first post contains more interesting content.
9
10Don't forget to read [the official SuperMD
11docs](https://zine-ssg.io/docs/supermd/) to know how to *style* your content.
12
13# Math
14
15Btw this sample website also includes the JS/CSS dependencies required to render
16math:
17
18```=mathtex
19\begin{aligned}
20f(t) &= \int_{-\infty}^\infty F(\omega) \cdot (-1)^{2 \omega t} \mathrm{d}\omega \\
21F(\omega) &= \int_{-\infty}^\infty f(t) \div (-1)^{2 \omega t} \mathrm{d}t \\
22\end{aligned}
23```
24
25This: [`(-1)^x = \cos(\pi x) + i\sin(\pi x)`]($mathtex) is an inline equation
26instead!
27
28# Code blocks
29
30
31```zig
32/// Shaper that uses CoreText.
33///
34/// CoreText shaping differs in subtle ways from HarfBuzz so it may result
35/// in inconsistent rendering across platforms. But it also fixes many
36/// issues (some macOS specific):
37///
38/// - Theta hat offset is incorrect in HarfBuzz but correct by default
39/// on macOS applications using CoreText. (See:
40/// https://github.com/harfbuzz/harfbuzz/discussions/4525)
41///
42/// - Hyphens (U+2010) can be synthesized by CoreText but not by HarfBuzz.
43/// See: https://github.com/mitchellh/ghostty/issues/1643
44///
45pub const Shaper = struct {
46 /// The allocated used for the feature list, font cache, and cell buf.
47 alloc: Allocator,
48
49 /// The string used for shaping the current run.
50 run_state: RunState,
51
52 /// CoreFoundation Dictionary which represents our font feature settings.
53 features: *macos.foundation.Dictionary,
54// ...
55```
56
57If you open the web inspector on the code below, you will see
58that the code has been correctly tagged for syntax highlighting, but it's currently
59on you to come up with CSS definitions for styling each class.