13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: About
4 | permalink: /about/
5 | ---
6 |
7 | I dream of writing a book on 2D graphics, but it's probably unrealistic. In the meantime, here are some resources that might be useful.
8 |
9 | The content of this book is licensed under [CC BY 4.0]. Feel free to quote and adapt freely, as long as you give attribution. All source code, including example code, code to generate figures, and any interactive demos, is licensed under [Apache 2.0].
10 |
11 | The [github repo](https://github.com/linebender/2d.graphics) for this book is open source and welcomes pull requests and issues.
12 |
13 | [CC BY 4.0]: https://creativecommons.org/licenses/by/4.0/
14 | [Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0
15 |
--------------------------------------------------------------------------------
/docs/assets/main.scss:
--------------------------------------------------------------------------------
1 | ---
2 | # Only the main Sass file needs front matter (the dashes are enough)
3 | ---
4 |
5 | $base-font-family: "EB Garamond", serif;
6 | $base-line-height: 1.3;
7 |
8 | @import "minima";
9 |
10 | // Override stuff in the minima theme. I'm sure I'll end up writing
11 | // my own CSS, but this fine for prototyping.
12 |
13 | .site-title {
14 | letter-spacing: 0;
15 | font-family: "Source Sans Pro", sans-serif;
16 | }
17 |
18 | .post-title {
19 | letter-spacing: 0;
20 | font-family: "Source Sans Pro", sans-serif;
21 | }
22 |
23 | h1, h2, h3, h4, h5, h6 {
24 | font-family: "Source Sans Pro", sans-serif;
25 | }
26 |
27 | pre, code {
28 | background-color: $background-color;
29 | font-family: Inconsolata;
30 | border: 0;
31 | }
32 |
33 | code {
34 | padding: 0;
35 | }
36 |
--------------------------------------------------------------------------------
/docs/assets/round.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/docs/book/color.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Color
4 | ---
5 | * CIE XYZ values
6 | * sRGB color space
7 | * larger-gamut color spaces
8 | * perceptual color spaces
9 | - Cover some similar ground as [Oklab blog post]
10 | - Probably introduce luma / chroma / hue model & Munsell history
11 | - perceptual color space is noneuclidean
12 | - CIELab is standard perceptual color space but has bad hue shift
13 | - [IPT] (family) has excellent hue
14 | - CIECAM is sophisticated
15 | - but performs poorly on gradient task because of chroma compression
16 | * gamut compression
17 |
18 | ## Resources
19 |
20 | * [Poynton Color FAQ](https://poynton.ca/ColorFAQ.html). A classic resource but missing information on more recent developments such as sRGB.
21 |
22 | * [Colour Appearance Issues in Digital Video, HD/UHD, and D‑cinema](https://poynton.ca/PDFs/Poynton-2018-PhD.pdf). This is Poynton's 2018 PhD, with very rich information on modern digital video formats.
23 |
24 | * [color vision](https://handprint.com/LS/CVS/color.html) by Bruce MacEvoy. A comprehensive resource, arguably the best on the web.
25 |
26 | * The [Wikipedia article on sRGB](https://en.wikipedia.org/wiki/SRGB) is ok and links to other resources.
27 |
28 | Color science has been a mature topic for some time. Here are a number of books on the topic, sorted by date:
29 |
30 | * [Color in Business, Science, and Industry](https://www.amazon.com/dp/0471452122/), Judd and Wyszecki, 1975.
31 |
32 | * [Color Science: Concepts and Methods, Quantitative Data and Formulae](https://www.amazon.com/dp/0471399183/), Wyszecki and Stiles, 2000.
33 |
34 | * [A Field Guide to Digital Color](https://www.amazon.com/dp/1568811616), Maureen Stone, 2003. (Also see [A Survey of Color for Computer Graphics](http://graphics.stanford.edu/courses/cs448b-02-spring/04cdrom.pdf), SIGGRAPH 2001 course notes)
35 |
36 | * [The Reproduction of Colour](https://www.amazon.com/dp/0470024259), RWG Hunt, 2004.
37 |
38 | * [Colorimetry: Understanding the CIE System](https://www.amazon.com/dp/0470049049), Janos Schanda (ed), 2007.
39 |
40 | * [Color: An Introduction to Practice and Principles](https://www.amazon.com/dp/1118173848), Rolf Kuehni, 2012.
41 |
42 | * [Color Appearance Models](https://www.amazon.com/dp/1119967031), Mark Fairchild, 2013.
43 |
44 | * [Billmeyer and Saltzman's Principles of Color Technology](https://www.amazon.com/dp/1119367220), Roy Berns, 2019.
45 |
46 | [Oklab blog post]: https://bottosson.github.io/posts/oklab/
47 |
48 | [IPT]: https://www.researchgate.net/publication/221677980_Development_and_Testing_of_a_Color_Space_IPT_with_Improved_Hue_Uniformity
49 |
--------------------------------------------------------------------------------
/docs/book/compositing.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Compositing
4 | ---
5 | * Alpha compositing
6 | + Porter-Duff
7 | - [Compositing Digital Images]
8 | + [Premultiplied][Premultiplied alpha] vs separated alpha
9 |
10 | $$ r = r_0 + (r_1 - r_0) \cdot \alpha_1 $$
11 |
12 | * Clipping and soft masking
13 | * Maybe affine transformation belongs here?
14 | * Blend modes
15 | - W3C spec on [Compositing and blending]
16 |
17 | [Alpha Compositing] is a very in-depth, interactive exposition by the legendary Bartosz Ciechanowski.
18 |
19 | [Alpha Compositing]: https://ciechanow.ski/alpha-compositing/
20 |
21 | [Premultiplied alpha]: https://nigeltao.github.io/blog/2022/premultiplied-alpha.html
22 |
23 | [Compositing and blending]: https://www.w3.org/TR/compositing-1/
24 |
25 | [Compositing Digital Images]: https://keithp.com/~keithp/porterduff/p253-porter.pdf
26 |
--------------------------------------------------------------------------------
/docs/book/contents.md:
--------------------------------------------------------------------------------
1 | ---
2 | # Feel free to add content and custom Front Matter to this file.
3 | # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
4 |
5 | layout: default
6 | title: Contents
7 | ---
8 | * [Introduction](intro.html)
9 |
10 | * [Color](color.html)
11 |
12 | * [Images](images.html)
13 |
14 | * [Shapes](shapes.html)
15 |
16 | * [Gradients](gradients.html)
17 |
18 | * [Compositing](compositing.html)
19 |
20 | * [Text](text.html)
21 |
22 | * [GPU Rendering](gpu_rendering.html)
23 |
--------------------------------------------------------------------------------
/docs/book/gpu_rendering.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: GPU Rendering
4 | ---
5 | Good academic papers on existing GPU-accelerated rendering:
6 |
7 | * [GPU Accelerated Path Rendering]
8 | * [Loop-Blinn Curve Rendering]
9 | * [Random Access Vector Graphics]
10 | * [Massively-Parallel Vector Graphics]
11 | * [Efficient GPU Path Rendering Using Scanline Rasterization]
12 |
13 |
14 | Blog posts for piet-gpu:
15 | * [piet-metal blog post]
16 | * [piet-gpu progress report]
17 | * [A sort-middle architecture for 2D graphics]
18 | * [Fast 2D rendering on GPU]
19 |
20 | An overview of the piet-gpu project is also given in the [piet-gpu vision] document.
21 |
22 | [piet-metal blog post]: https://raphlinus.github.io/rust/graphics/gpu/2019/05/08/modern-2d.html
23 |
24 | [Random Access Vector Graphics]: http://hhoppe.com/proj/ravg/
25 | [Massively-Parallel Vector Graphics]: http://w3.impa.br/~diego/projects/GanEtAl14/
26 | [Efficient GPU Path Rendering Using Scanline Rasterization]: http://kunzhou.net/zjugaps/pathrendering/
27 | [piet-gpu progress report]: https://raphlinus.github.io/rust/graphics/gpu/2020/06/01/piet-gpu-progress.html
28 | [A sort-middle architecture for 2D graphics]: https://raphlinus.github.io/rust/graphics/gpu/2020/06/12/sort-middle.html
29 | [Fast 2D rendering on GPU]: https://raphlinus.github.io/rust/graphics/gpu/2020/06/13/fast-2d-rendering.html
30 |
31 | [piet-gpu vision]: https://github.com/linebender/piet-gpu/blob/master/doc/vision.md
32 | [GPU Accelerated Path Rendering]: https://developer.nvidia.com/gpu-accelerated-path-rendering
33 | [Loop-Blinn Curve Rendering]: https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf
34 |
--------------------------------------------------------------------------------
/docs/book/gradients.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Gradients
4 | ---
5 | * Linear gradients
6 | * Radial gradients
7 | - Center offset
8 | * Extend modes
9 | * Advanced topic: what colorspace for interpolation?
10 |
--------------------------------------------------------------------------------
/docs/book/images.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Images
4 | ---
5 | * [A Pixel Is Not a Little Square](http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf)
6 |
7 | Should sampling and reconstruction be a separate chapter? It's intimately tied to images.
8 |
9 | [Prefilters for Sharp Image Display] is a fantastic resource for sampling and reconstruction. Rocha's masters thesis, [Optimal prefilters for display enhancement], covers the same material and provides even more background. Some points we definitely want to cover:
10 |
11 | * Tradeoff between aliasing, ringing, and sharpness
12 | - Pure sinc filter is wrong; prioritizes aliasing and sharpness, ringing is bad
13 | - Box filter is good for sharpness but bad on aliasing
14 | * Oblique projections
15 | - First filter determines aliasing vs ringing tradeoff
16 | - Second filter improves sharpness
17 | * Clamping
18 | - Serious issue for text, less so natural images
19 | - HDR may reduce need for clamping positive light
20 |
21 | [A Fresh Look at Generalized Sampling] is a deep theoretical exploration into filtering and reconstruction.
22 |
23 | [Prefilters for Sharp Image Display]: https://www.inf.ufrgs.br/~eslgastal/SBS3/Rocha_Oliveira_Gastal_EG2020_Sharp_Filter_SBS3.pdf
24 | [A Fresh Look at Generalized Sampling]: http://hhoppe.com/filtering.pdf
25 | [Optimal prefilters for display enhancement]: https://lume.ufrgs.br/handle/10183/213511
--------------------------------------------------------------------------------
/docs/book/intro.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Introduction
4 | ---
5 | The introduction goes here. It should sound very grandiose.
6 |
7 | The topics covered here overlap considerably with the [2D Vector Graphics Course] by Diego Nehab.
8 |
9 | [2D Vector Graphics Course]: http://w3.impa.br/~diego/teaching/vg/
--------------------------------------------------------------------------------
/docs/book/shapes.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Shapes
4 | ---
5 | Shapes are at the heart of 2D graphics. All user interfaces are built on a foundation of rectangles, a simple but important shape. Text rendering is composed of glyphs, each of which is a shape on its own. And of course filled and stroked shapes are important in vector illustration applications as well as charts and other data visualization.
6 |
7 | At its most general and abstract, a shape is a function from a point on the plane to a Boolean indicating whether the point is in the interior of the shape, so mathematically can be represented as $$\boldsymbol{R}^2 \rightarrow \{0, 1\}$$.
8 |
9 | As a particularly simple example, the circle centered at $$(x_0, y_0)$$ with radius $$r$$ can be represented with the following predicate:
10 |
11 | $$
12 | (x - x_0)^2 + (y - y_0)^2 \leq r^2
13 | $$
14 |
15 | It's even simpler when using vector notation rather than writing out individual coordinates:
16 |
17 | $$
18 | |\boldsymbol{x} - \boldsymbol{x}_0|^2 \leq r^2
19 | $$
20 |
21 | Most commonly, though, in 2D graphics, shapes are represented as *paths.* A point is on the interior of a filled path when its winding number is either nonzero or odd, depending on the fill rule. A path can also be stroked, basically the result of drawing a pen with a given radius along the path, though there are subtleties.
22 |
23 | ## Paths
24 |
25 | A path is represented as a sequence of path segments. Each path segment is most commonly represented as a parametric curve $$(x(t), y(t))$$ or $$\boldsymbol{x}(t)$$, with the parameter $$t$$ conventionally ranging from $$[0..1]$$.
26 |
27 | The simplest curve segment is a line, which is represented a pair of points $$(\boldsymbol{x}_0,\boldsymbol{x_1})$$. Then the formula is:
28 |
29 | $$
30 | \boldsymbol{x}(t) = (1 - t)\boldsymbol{x}_0 + t\boldsymbol{x}_1
31 | $$
32 |
33 | Paths consisting entirely of line segments are common, and are called *polylines.* For curves, there are choices of curve representations. The most common are definitely Bézier curves, though many systems also admit other primitives such as circular or elliptical arcs.
34 |
35 | A quadratic Bézier is represented as three points, and its parametric formula is:
36 |
37 | $$
38 | \boldsymbol{x}(t) = (1 - t)^2\boldsymbol{x}_0 + 2(1-t)t\boldsymbol{x}_1 + t^2\boldsymbol{x}_2
39 | $$
40 |
41 | Similarly, a cubic Bézier is defined as:
42 |
43 | $$
44 | \boldsymbol{x}(t) = (1 - t)^3\boldsymbol{x}_0 + 3(1-t)^2t\boldsymbol{x}_1 + 3(1-t)t^2\boldsymbol{x}_2 + t^3\boldsymbol{x}_3
45 | $$
46 |
47 | The general equation for an order $n$ Bézier is:
48 |
49 | $$
50 | \boldsymbol{x}(t) = \sum_{i=0}^n \binom{n}{i} (1 - t)^{n - i} t^i \boldsymbol{x}_i
51 | $$
52 |
53 | However, orders greater than 3 are rarely used. Note that $$\boldsymbol{x}(0) = \boldsymbol{x}_0$$ and $$\boldsymbol{x}(1) = \boldsymbol{x}_n$$. The points $$\boldsymbol{x}_i$$ where $$1 \leq i < n$$ are called *control points* or sometimes *off-curve points.* The endpoints are, of course, *on-curve points.*
54 |
55 | Bézier curves have many advantages for 2D graphics. One special strength is that they are closed under affine transformation - the affine transform of a Bézier curve is the affine transformation of each of its points.
56 |
57 | ### Winding number
58 |
59 | How do we determine whether a point is on the inside or outside of a closed path? The systematic way is in terms of the *winding number* of the curve with respect to the point.
60 |
61 | For winding number to be meaningful, the path must be a sequence of closed subpaths. For a subpath to be closed, the end point of each segment must coincide with the start point of the next (in cyclic order, so the "next" segment after the last in a subpath is the fist in the subpath).
62 |
63 | Thus, the subpath taken as a whole is $G0$ continuous. It can be rewritten in polar coordinates, $$r(t), \theta(t)$$, where $$0 \leq t \leq n$$. Here is is convenient to take $$n$$, the number of segments in the subpath, as the upper bound for $$t$$, so the $$t$$ parameter for any segment is simply the fractional part.
64 |
65 | Then, the winding number is:
66 |
67 | $$
68 | \frac{\theta(n) - \theta(0)}{2\pi}
69 | $$
70 |
71 |
72 |
73 | In a y-up coordinate system, anticlockwise rotation is considered a positive winding number, with clockwise negative. Since y-down is more common in graphics, we'll use the opposite convention, so clockwise is positive, and this will let use use the same math.
74 |
75 | Winding numbers are closely related to contour integrals, and a more direct definition is as follows:
76 |
77 | $$
78 | \frac{1}{2\pi} \oint_C \,\frac{(\boldsymbol{x}(t) - \boldsymbol{x}_0) \times \boldsymbol{x}'(t)}{|\boldsymbol{x}(t) - \boldsymbol{x}_0|^2}\,dt
79 | $$
80 |
81 |
82 |
83 |
84 |
85 | #### Ray casting
86 |
87 | While the contour integral formulation is a fine mathematical definition, it is not particularly easy or efficient to calculate directly. For that, *ray casting* is a better technique.
88 |
89 | The essence of the technique is to cast a ray from $$(-\infty, y)$$ to $$(x, y)$$ and count all crossings with the path. In a y-down coordinate system, any crossing with the path going upward, in other words $$dy/dt < 0$$ counts as +1, and downward counts as -1.
90 |
91 | This technique is more efficient, but requires some care with edge conditions. Here is the more detailed algorithm for line segments.
92 |
93 | The total winding number is simply the sum of the contribution from each segment.
94 |
95 | The first step is to reject the segment based on $$y$$. More precisely, the segment is rejected if $$y < \min(y_0, y_1)$$ or $$y \geq \max(y_0, y_1)$$, in which case its winding number contribution is 0. Note that the edge cases are carefully constructed so that a ray through a closed path always has an even number of crossings. In addition, horizontal line segments are rejected.
96 |
97 | Then the line segment is solved for $$x$$ given $$y$$. There is a winding number contribution if $$x$$ is to the right of the line:
98 |
99 | $$
100 | x > x_0 + (y - y_0)\frac{x_1 - x_0}{y_1 - y_0}
101 | $$
102 |
103 | In that case, the winding number contribution is $$\text{signum}(y_0 - y_1)$$.
104 |
105 | The technique generalizes to curves. The curve segment is split into y-monotonic subsegments, then for each subsegment the same technique is used, solving the curve for $$x$$ given $$y$$.
106 |
107 | * [A Primer on Bézier Curves](https://pomax.github.io/bezierinfo/)
108 | * Winding number
109 | - Mathematical interpretation
110 | - Even/odd and nonzero winding number rules
111 |
112 | ## Stroking
113 |
114 | The two main ways that paths become images are filling, discussed above, and stroking. Informally, stroking can be understood as sweeping a pen, with some thickness, along the stroke. Unlike filling, which is well defined (winding number rule is the only relevant parameter other than the path itself), there is considerable variation in stroking, both in *stroke style* and in variations among implementations. On the other hand, while filling requires closed paths, stroking works for open paths as well.
115 |
116 | There is no single clear mathematical definition of stroking. Existing systems tend to be defined by their implementations, though there are efforts to define it more systematically. There are (at least) three relevant definitions: Minkowski sum, swept line, and offset curve.
117 |
118 | ### Minkowski sum
119 |
120 | The mathematically simplest form of stroking can be expressed as the Minkowski sum of a disc with the set of points on the path. Expanding that out, the predicate can be written:
121 |
122 | $$
123 | \exists\, i, t: |\text{path}[i](t) - \boldsymbol{x}| < r
124 | $$
125 |
126 | This style of stroking is certainly simplest from the mathematical perspective, but is not generally the default or the most common. It results in strokes with round ends, and round joins at angled corners, the outline defined by circular arcs.
127 |
128 | 
129 |
130 | One advantage of the Minkowski sum formuation is that it generalizes to other pen shapes than a circle. For example, affine transformation of a stroked outline is equivalent to stroking the affine transformed source path with an elliptical pen.
131 |
132 | ### Stroke styles
133 |
134 | In the base set, caps are round, butt, and square, and joins are round, miter, and bevel. Traditionally, there is also "miter limit" setting, so that if the angle is more acute than the limit, the join is bevel, otherwise miter.
135 |
136 | TODO: show examples. In the meantime, [MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes) is a reasonable source.
137 |
138 | The [SVG 2 draft spec] proposes additional styles, but these are not in widespread use.
139 |
140 | ### Swept line
141 |
142 | The main limitation of the Minkowski sum approach is that it can only express round ends and joins, while designers prefer a wider range of styles. These other styles are generally expressed as the stroke of each continuous path segment, plus additional elements applied to the ends and joins at corners.
143 |
144 | The stroke of a single continuous curve segment is defined by sweeping a line along the path, centered on that path, and normal to it.
145 |
146 | In general, when round caps and joins are specified, the swept line definition is equivalent to Minkowski sum, but as [Nehab 2020] points out, there is one edge case, namely a cubic Bézier containing a cusp, where the swept line definition gives a flat cap.
147 |
148 | When paths have extremes of curvature, the outline can have complex shapes, defined in [Nehab 2020] as evolutes. Computing these shapes is nontrivial.
149 |
150 | The [SVG 2 draft spec] is defined in terms of swept line. That said, it is rare for implementations to rigorously follow this spec.
151 |
152 | ### Offset curves
153 |
154 | A third definition is offset curves, otherwise known as parallel curves. Swept along a continuous curve, a line normal to that curve traces a parallel curve offset by the half-width of the line in either direction. Joins can be defined by stitching together the endpoints of these parallel curves, with additional path segments for the different join types (TODO: be more precise). Butt caps can be defined as drawing line segments from the endpoints.
155 |
156 | The main motivation for this definition is to enable performant implementations. Efficient algorithms for parallel curve are known, but not so much for the evolutes as defined in [Nehab 2020].
157 |
158 | For paths that do not have extremes of curvature (relative to the line width), the results are the same as the swept line definition.
159 |
160 | When authoring vector content, it is best not to depend on handling of these edge cases, as implementations may vary. One way to achieve robustness is to specify round joins and caps. Another is to avoid excessive curvature, or, failing that, perform stroke to fill expansion during authoring.
161 |
162 | TODO: another challenge in computing offset curves is the presence of cusps.
163 |
164 | At the time of writing, the popular Skia library renders strokes consistent with the offset curve definition.
165 |
166 | #### Computation of offset curves
167 |
168 | There is a large literature on computing offset curves, as there are applications in computer aided design and manufacturing, path planning in robotics, and other domains. Yet, quality implementions are elusive.
169 |
170 | [Tiller and Hanson] is commonly cited and frequently implemented, but its results for cubic Béziers are poor. In fact, they have only $$O(n^2)$$ scaling. The results for quadratic Béziers are better, with $$O(n^4)$$ scaling, and discerning implementors (including [Nehab 2020]) often use the quadratic version.
171 |
172 | A new algorithm based on quartic curve fitting is given in [Parallel curves of cubic Béziers]. This algorithm as $$O(n^6)$$ scaling, good robustness, and good performance. It may not be as suitable for implementation on GPU, as it relies on recursive subdivision for finding cusps, and the quartic solver may be difficult to adapt to 32 bit floating point precision while retaining good numerical robustness. Another choice is to use [Euler spirals][Cleaner parallel curves with Euler spirals].
173 |
174 | ### Dashing
175 |
176 | Another optional variation on style is *dashing.*
177 |
178 | Note that determining the parameter $$t$$ for the start and end of each dash is an inverse arc length problem.
179 |
180 |
181 |
182 | ## References
183 |
184 | * Nehab 2020: [Converting stroked primitives to filled primitives][Nehab 2020]
185 | * Kilgard 2020: [Polar Stroking][Kilgard 2020]
186 | * [Parallel curves of cubic Béziers]
187 | * [Cleaner parallel curves with Euler spirals]
188 | * Tiller and Hanson: [Offsets of Two-Dimensional Profiles][Tiller and Hanson]
189 | * [Shader-Based Antialiased, Dashed, Stroked Polylines]
190 |
191 | [Kilgard 2020]: https://arxiv.org/abs/2007.00308
192 | [Nehab 2020]: http://w3.impa.br/~diego/projects/Neh20/
193 | [Shader-Based Antialiased, Dashed, Stroked Polylines]: https://jcgt.org/published/0002/02/08/paper.pdf
194 | [SVG 2 draft spec]: https://www.w3.org/TR/SVG2/
195 | [Tiller and Hanson]: https://ieeexplore.ieee.org/iel5/38/4055906/04055919
196 | [Cleaner parallel curves with Euler spirals]: https://raphlinus.github.io/curves/2021/02/19/parallel-curves.html
197 | [Parallel curves of cubic Béziers]: https://raphlinus.github.io/curves/2022/09/09/parallel-beziers.html
198 |
--------------------------------------------------------------------------------
/docs/book/text.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: chapter
3 | title: Text
4 | ---
5 | Hoo boy!
6 |
7 | * Unicode
8 | * Text + font + markup -> layout
9 | * Shaping
10 | * Fonts
11 | + This is probably a separate chapter
12 | * So much stuff
13 |
14 | ## Resources
15 |
16 | * [Text Rendering Hates You]: https://gankra.github.io/blah/text-hates-you/
17 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | # Feel free to add content and custom Front Matter to this file.
3 | # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
4 |
5 | layout: home
6 | ---
7 | This is a dream of a book I would really like to write, covering at least the basics of most topics in 2D graphics. There are many excellent textbooks for 3D graphics, and cources are widely taught, but there's really nothing comprehensive for 2D out there.
8 |
9 | It's very difficult to find enough time as it is, much less adding writing a book, but I'm hoping I will have bursts of energy, especially as I dig deep into one topic or other. I also use this repo to collect references to high quality resources, and that alone is something that may be helpful to some people.
10 |
11 | This project is open source, and pull requests and issues are welcome. Just head to the [github repo](https://github.com/linebender/2d.graphics).
12 |
13 | And if you'd like to take a look at what's here, go through to the [contents.](/book/contents.html)
14 |
15 | -- Raph Levien
16 |
--------------------------------------------------------------------------------