https://github.com/iolanguage/font
https://github.com/iolanguage/font
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/iolanguage/font
- Owner: IoLanguage
- License: bsd-3-clause
- Created: 2018-03-11T11:54:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T12:04:18.000Z (about 8 years ago)
- Last Synced: 2025-01-21T00:49:18.376Z (over 1 year ago)
- Language: C
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Font
The Font object can be used to load and render TrueType fonts. Example use:
```Io
// within a GLUT display callback...
timesFont = Font clone open(\"times.ttf\")
if (timesFont error, write(\"Error loading font: \", timesFont error, \"\n\"); return)
timesFont setPointSize(16)
glColor(0,0,0,1)
timesFont draw(\"This is a test.\")
```
Rendering fonts using OpenGL textures
Smaller fonts (those having a point size around 30 or smaller, depending on the font) will automatically be cached in and rendered from a texture. This technique is very fast and should support rendering speeds as fast (or faster than) those of typical desktop font rendering systems. Larger font sizes(due to texture memory constraints) will be rendered to a pixelmap when displayed. Thanks to Mike Austin for implementing the font texturing system.
# Installation
`freetype` should be install and foundable in your system. Then:
```
eerie install https://github.com/IoLanguage/Font.git
```