Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomolt/libschrift
A lightweight TrueType font rendering library
https://github.com/tomolt/libschrift
c library suckless truetype
Last synced: 3 months ago
JSON representation
A lightweight TrueType font rendering library
- Host: GitHub
- URL: https://github.com/tomolt/libschrift
- Owner: tomolt
- License: isc
- Created: 2020-04-04T15:34:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-25T19:26:35.000Z (10 months ago)
- Last Synced: 2024-08-01T00:41:27.920Z (6 months ago)
- Topics: c, library, suckless, truetype
- Language: C
- Homepage:
- Size: 1.76 MB
- Stars: 453
- Watchers: 13
- Forks: 32
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesomecpp - libschrift - - a lightweight TrueType font rendering library. (Graphics)
- awesome-list - libschrift
README
libschrift
==========
*libschrift* is a lightweight TrueType font rendering library.libschrift aims to:
- Be as simple and easy-to-use as possible.
See:
- Make correct (as in artifact-free, Unicode-aware etc.)
font rendering easy to achieve.
- Be reasonably secure, which especially means to not crash,
leak memory / resources or expose major security
vulnerabilities on corrupted / malicious / random inputs.Features
--------
- Unicode support
- Very small! (~1500 LoC)
- No dependencies on anything other than the C standard library
(POSIX / WINAPI are only used for memory mapping, which is not essential)
- Compatible with any C99 compiler
- Highly portable! Some versions have been tested on
Linux, OpenBSD, FreeBSD, Windows, iOS, and macOS!Limitations
-----------
- Unicode is the only supported text encoding.
- Support for most TrueType (.ttf) and certain OpenType (.otf) fonts.
No bitmap or PostScript fonts.
- No hinting. Especially no auto-hinting as found in FreeType2.
- No color emojis.Building
--------
On **Unix-like systems** including Mac OS, you can use `make && make install`
to install libschrift as a system-wide library. Since it is statically linked,
you only need the library files for development.
Users of your projects do not need to install libschrift.On **Windows**, you can either use the provided MSVC project,
or compile with make via MSYS, or simply compile manually.**Alternatively**, you can always copy-paste `schrift.c` and `schrift.h` into your
own projects source folder.Documentation
-------------
For documentation on how to use libschrift in your own projects,
refer to the *schrift(3)* man page,
the source code of the bundled *demo*,
as well as the header file *schrift.h*.You can view the man page in your browser at
Progress
--------
In terms of both security and performance, libschrift is already pretty solid.
However, it is still missing some important features, like right-to-left text support.Visual Quality
--------------
A screenshot of the demo program:
![demo screenshot](resources/demo-screenshot.png)Contributing
------------
Bug Reports, Suggestions, Questions, Criticism, Pull Requests and Patches are all welcome!You can also support the project by buying me (Thomas Oltmann) a coffee, if you'd like: