Skip to content

AlexandruIca/BezierContours

Repository files navigation

Rendering Bézier curves

This is a very basic implementation of Eric Lengyel's work: GPU-Centered Font Rendering Directly from Glyph Outlines. It only implements the non-optimised version. The purpose of this is to have something that works.

At first I implemented a version where there was no anti-aliasing done, and the way I defined the quadratic Bézier curves was questionable, but at least it rendered something:

Example

Then I tried adding anti-aliasing:

Example with anti-aliasing

The difference can be seen either at lower resolutions or when zooming in: No-AA AA

In the sdl folder there is a version which uses the GPU to render the curves, with similar anti-aliasing done: GPU

In the glyph folder I implemented actual glyph rendering using Freetype to read .ttf files: Roboto Wildwood

Building

${CXX} main.cpp stb.cpp

For the GPU version:

mkdir build && cd build
conan install ..
cmake ..
cmake --build .
./Bezier

About

Rendering shapes defined by Bézier curves

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published