inferno / module / freetype.m

Freetype: module {
	PATH: con "$Freetype";

	Matrix: adt {
		a, b: int;	# 16.16 fixed-point coefficients
		c, d: int;

	Vector: adt {
		dx: int;	# 26.6 fixed-point deltas
		dy: int;

	STYLE_BOLD: con 1 << iota;

	Face: adt {
		nfaces: int;
		index: int;
		style: int;		# STYLE_xxx
		height: int;
		ascent: int;
		familyname: string;
		stylename: string;

		# pts - point size as a 26.6 fixed-point value
		setcharsize: fn(face: self ref Face, pts, hdpi, vdpi: int): string;
		settransform: fn(face: self ref Face, m: ref Matrix, v: ref Vector): string;
		haschar: fn(face: self ref Face, c: int): int;
		loadglyph: fn(face: self ref Face, c: int): ref Glyph;

	Glyph: adt {
		top: int;
		left: int;
		height: int;
		width: int;
		advance: Draw->Point;	# 26.6 fixed-point
		bitmap:	array of byte;	# (width*height) 8-bit greyscale

	newface: fn(path: string, index: int): ref Face;
	newmemface: fn(data: array of byte, index: int): ref Face;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.