All Projects → mightycow → Sluggish

mightycow / Sluggish

Licence: unlicense
Toy CPU and GPU implementations of the Slug rendering algorithm

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Sluggish

Stories About Ming Dynasty
明朝那些事儿(全七卷)
Stars: ✭ 52 (-25.71%)
Mutual labels:  font
Fontello Svg
Generate SVG icons from a Fontello icon set.
Stars: ✭ 59 (-15.71%)
Mutual labels:  font
Fonthx
Font File Generation in Haxe
Stars: ✭ 64 (-8.57%)
Mutual labels:  font
Bootstrapcdn
Free Bootstrap CDN hosting
Stars: ✭ 1,075 (+1435.71%)
Mutual labels:  font
Swifticonfont
Icons fonts for iOS (Font Awesome 5, Iconic, Ionicon, Octicon, Themify, MapIcon, MaterialIcon, Foundation 3, Elegant Icon, Captain Icon)
Stars: ✭ 1,094 (+1462.86%)
Mutual labels:  font
Font
用于个人博客所用的中文字体
Stars: ✭ 61 (-12.86%)
Mutual labels:  font
Dompdf
HTML to PDF converter for PHP
Stars: ✭ 8,446 (+11965.71%)
Mutual labels:  font
Free Font
大概是2020年最全的免费可商用字体,这里收录的商免字体都能找到明确的授权出处,可以放心使用,持续更新中...
Stars: ✭ 1,140 (+1528.57%)
Mutual labels:  font
Glyphhanger
Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
Stars: ✭ 1,099 (+1470%)
Mutual labels:  font
Julia Logo Graphics
official versions of the Julia logo
Stars: ✭ 64 (-8.57%)
Mutual labels:  font
Svg Embed Font
A tool to embed font files in SVG so they will render properly across all devices
Stars: ✭ 55 (-21.43%)
Mutual labels:  font
Heteroflow
Concurrent CPU-GPU Programming using Task Models
Stars: ✭ 57 (-18.57%)
Mutual labels:  gpu-acceleration
Some Time Later
Font inspired by the title and time cards in the Nickelodeon cartoon SpongeBob SquarePants
Stars: ✭ 62 (-11.43%)
Mutual labels:  font
Docker Texlive
A docker container containing an installation of texlive as well as several useful scripts.
Stars: ✭ 52 (-25.71%)
Mutual labels:  font
Mikhak
simple monoline Arabic-Latin semi handwriting typeface
Stars: ✭ 64 (-8.57%)
Mutual labels:  font
Speakingurl
Generate a slug – transliteration with a lot of options
Stars: ✭ 1,056 (+1408.57%)
Mutual labels:  slug
Govicons
🇺🇸 US Government themed icons and CSS toolkit
Stars: ✭ 60 (-14.29%)
Mutual labels:  font
Slugifier
Just a simple, clean and pure functional implementation for creating slugs
Stars: ✭ 69 (-1.43%)
Mutual labels:  slug
Linearicons
Linearicons is the highest quality set of line icons, matching with minimalist UI designs in iOS.
Stars: ✭ 64 (-8.57%)
Mutual labels:  font
Quickfont
A Modern OpenGL Font Rendering Library for OpenTK
Stars: ✭ 63 (-10%)
Mutual labels:  font

Presentation

This is a toy/experimental project showing off how to get started rendering glyphs with Eric Lengyel's Slug algorithm on both CPUs and GPUs.

I recommend reading at least the slides linked in the reference section before any of the code.

Requirements

  • Windows x64
  • Visual C++ 2013 or later for compiling
  • OpenGL 3.2 for the hardware renderer

Project breakdown

Sub-project Purpose
Font generator Reads a .ttf TrueType font file and outputs a .sluggish file
Software renderer Reads a .sluggish file and outputs a .tga image per specified code point
Hardware renderer Reads a .sluggish file and renders up to 6 specified glyphs using OpenGL
Feature Support
Curves texture (FP32) YES
Bands texture (U16) YES
Cutting glyphs into bands (performance) YES
Sorting curves (performance) YES
High-quality implementation of anything NO
High performance NO
16-bit floating point encoding NO
Data de-duplication and compression NO
Text layouting NO
Colored shapes NO
Adaptive super-sampling NO
Gamma correction NO
Bounding polygons NO

The goal was to keep things pretty simple while still not having awful performance. For instance, cutting the glyphs into bands has been implemented because it's simple and improves performance massively.

Debugging

By default, the debugger's target executable isn't in the output directory but a directory path specified by the SLUGGISH_APP_DIR environment variable.

The .exe and .pdb files are copied over to that directory after every build.

To make this process easy, you can launch Visual Studio through a simple batch script:

:: This file would sit next to the Sluggish directory
cd Sluggish\makefiles\vs2013
set SLUGGISH_APP_DIR=C:\important_stuff\sluggish
Sluggish.sln

References

To learn more about how the Slug algorithm works, refer to:
GPU-Centered Font Rendering Directly from Glyph Outlines by Eric Lengyel
Journal of Computer Graphics Techniques (JCGT), vol. 6, no. 2, 31-47, 2017
Paper: http://jcgt.org/published/0006/02/02
Slides: http://terathon.com/i3d2018_lengyel.pdf

Licenses

Project/File License(s) License File(s)
This project Unlicense (public domain) UNLICENSE.MD
SDL 2 zlib libs/SDL2/COPYING.txt
GLEW Modified BSD License
Mesa 3-D License (MIT)
Khronos License (MIT)
libs/GLEW/LICENSE.txt
premake 5 premake 5 makefiles/PREMAKE_LICENSE.txt
stb_truetype.h Pick-a-license:
Unlicense (public domain)
MIT
code/generator/stb_truetype.h
stb_image_write.h Pick-a-license:
Unlicense (public domain)
MIT
code/renderer_sw/stb_image_write.h

Patent

While there is no patent on the Slug algorithm as of the time of writing, Eric Lengyel has made an application for one and the process is still on-going...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].