Skip to content

Commit

Permalink
Minor documentation corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinne26 committed May 13, 2022
1 parent e4fc693 commit 8b416e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func checkMissingRunes(name string, font *etxt.Font) error {

This example focuses on the mundane usage of the main **etxt** `FontLibrary` and `Renderer` types, with abundant checks to fail fast if anything seems out of place.

If you want flashier examples there are still [many more](https://github.com/tinne26/etxt/tree/main/examples) in the project, make sure to check them out!
If you want flashier examples you can find [many more](https://github.com/tinne26/etxt/tree/main/examples) in the project, make sure to check them out!

## Can I use this package without Ebiten?
Yeah, you can compile it with `-tags gtxt`. Notice that `gtxt` will make text drawing happen on the CPU, so don't try to use it for real-time stuff. In particular, be careful to not accidentally use `gtxt` with Ebiten (they are compatible in many cases, but performance will die).
Expand Down
6 changes: 3 additions & 3 deletions docs/rasterize-outlines.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rasterizing outlines
This document aims to give a general overview of the rasterization algorithms used by [`vector.Rasterizer`](https://pkg.go.dev/golang.org/x/image/vector) and [`emask.EdgeMarker`](https://pkg.go.dev/github.com/tinne26/etxt/emask#EdgeMarker).
This document aims to give a general overview of the rasterization algorithms used by [`vector.Rasterizer`](https://pkg.go.dev/golang.org/x/image/vector) and [`emask.EdgeMarker`](https://pkg.go.dev/github.com/tinne26/etxt/emask#EdgeMarkerRasterizer).

While this package focuses on glyph rendering, these algorithms are suitable for general 2D vector graphics. That said, they are CPU-based processes best suited for small shapes; in the case of big shapes, GPU algorithms based on triangulation and [spline curve rendering](https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-25-rendering-vector-art-gpu) may be a better choice.

Expand Down Expand Up @@ -50,7 +50,7 @@ Let's say we have a glyph like this:

![](https://github.com/tinne26/etxt/blob/main/docs/img/glyph_filled.png?raw=true)

Now, starting from the left side, we start going to the right, and each time we cross an outline boundary, we mark it. The result would be something like this:
Now, starting from the left side, we start going towards the right and each time we cross an outline boundary, we mark it. The result would be something like this:

![](https://github.com/tinne26/etxt/blob/main/docs/img/glyph_edges.png?raw=true)

Expand All @@ -62,7 +62,7 @@ We are making progress now, but there are still a few loose ends...

First, to account for clockwise and counter-clockwise directions and make "holes" possible, we will make positive y changes (upward lines) set positive crossing values, and negative y changes (downward lines) set negative crossing values.

If we use cyan for positive changes and magenta for negative ones, the result would now look like this:
If we use different colors for positive and negative changes, the result would now look like this:

![](https://github.com/tinne26/etxt/blob/main/docs/img/glyph_sign.png?raw=true)

Expand Down

0 comments on commit 8b416e3

Please sign in to comment.