Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

maandree/libskrift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo has been moved to Codeberg and may be out of date on GitHub.
Canonical repo: https://codeberg.org/maandree/libskrift


libskrift is a text drawing library for C that is based on libschrift.

The name:

	Schrift in libschrift is German for “font” (can also mean “scripture”),
	skrift in libskrift is Swedish for “scripture” (cannot mean “font”).


Currently implemented:

	Anti-aliased rendering.

	Subpixel rendering (RGB, BGR, both horizontal and vertical).

	DPI support. (Points, inches, and millimeters can be
	exactly converted to pixels.)
	(Both horizonal and vertical resolution can be specified.)

	Drawing coloured text with 3 primaries, alpha and opacity,
	(100% opacity but 0% alpha will cut out the text so it is
	transparent, rather than at least as opaque as the background,
	where the text is.)

	Drawing on RGB, XRGB, ARGB, and RGBA with 8-bit, 16-bit,
	32-bit, and 64-bit subpixels, RGB, ARGB, and RGBA with
	`float`, `double`, and `long double`, with either
	premultipled or non-premultipied alpha.
	(The "RGB" in all these formats can be any primitive, but
	the screen's is assumed for subpixel rendering, pre- and
	postprocessors can be used to change colour space if
	required.)

	Drawing on surfaces encoded with different endians: host
	endian, big endian, or little endian, either on pixel level
	or subpixel level.

	sRGB gamma function.

	Affine transformations on glyphs and texts.

	Inter-character spacing.


Not implemented yet

	Glyph caching.

	Normalise text when glyphs are missing.

	Fallback fonts.

	Font metrics.

	Autokerning.

	Vertical text.

	Text shaping.

	Font searching.


Things that require new features in libschrift

	Aliased rendering.

	Hinting.
	(Better subpixel rendering requires subpixel-aware hinting.)

	Affine transformations on parts of outline.

	Kerning using font information.

	Proper grapheme cluster support.

	Draw outline (only) with custom stroke width and shape.


Out of scope:

	Bidirectional text.

	Text justification.

	Line breaks.

	Multicolouring.

	Underline, overline, strike-thought, ...

	Superscript and subscript.

	Mathematical formulae formatting.

About

Text drawing library using libschrift

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published