The truetype-clx Reference Manual

This is the truetype-clx Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 18:09:40 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 truetype-clx

Ripped out rendering from clx-truetype

License

MIT

Version

0.1

Dependencies
  • zpb-ttf (system).
  • cl-vectors (system).
  • cl-paths-ttf (system).
  • cl-aa (system).
Source

truetype-clx.asd.

Child Component

truetype-clx.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 truetype-clx/truetype-clx.asd

Source

truetype-clx.asd.

Parent Component

truetype-clx (system).

ASDF Systems

truetype-clx.


3.1.2 truetype-clx/truetype-clx.lisp

Source

truetype-clx.asd.

Parent Component

truetype-clx (system).

Packages

truetype-clx.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 truetype-clx

Source

truetype-clx.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: baseline-to-baseline (font pt dpi)

Returns distance between baselines of @var{font}. ascent - descent + line gap

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: font-ascent (font pt dpi)

Returns ascent of @var{font}.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: font-descent (font pt dpi)

Returns descent of @var{font}.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: font-line-gap (font pt dpi)

Returns line gap of @var{font}.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-bounding-box (font pt-size string dpi-x dpi-y &key underline overline)

Returns text bounding box. Text bounding box is only for contours. Bounding box for space (#x20) is zero.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-height (font pt string dpi-x dpi-y)

Returns height of text bounding box.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-line-bounding-box (font pt-size string dpi-x dpi-y &key underline overline)

Returns text line bounding box. Text line bounding box is bigger than text bounding box. It’s height is ascent + descent, width is sum of advance widths minus sum of kernings.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-line-height (font pt string dpi-x dpi-y)

Returns height of text line bounding box.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-line-pixarray (font string pt dpi-x dpi-y &key antialias underline overline strikethrough)

Render a text line of ’face’, returning a 2D (unsigned-byte 8) array suitable as an alpha mask, and dimensions. This function returns five values: alpha mask byte array, x-origin, y-origin (subtracted from position before rendering), horizontal and vertical advances.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-line-width (font pt string dpi-x dpi-y)

Returns width of text line bounding box. It is sum of advance widths minus sum of kernings.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-pixarray (font string pt dpi-x dpi-y &key antialias underline overline strikethrough)

Render a text string of FONT, returning a 2D (unsigned-byte 8) array suitable as an alpha mask, and dimensions. This function returns five values: alpha mask byte array, x-origin, y-origin (subtracted from position before rendering), horizontal and vertical advances. Only works for single characters.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: text-width (font pt string dpi-x dpi-y)

Returns width of text bounding box.

Package

truetype-clx.

Source

truetype-clx.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *inch/pts*

How many pts per inch. CSS/android is 96

Package

truetype-clx.

Source

truetype-clx.lisp.


5.2.2 Ordinary functions

Function: aa-bin/update-state (state paths)

Update state for not antialiasing renderer.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: cells-sweep (state function &optional function-span antialias)

Wrapper around antialising and not antialiasig renderers.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: clamp (value min max)

Clamps the value ’value’ into the range [min,max].

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: clamp-alpha (alpha)
Package

truetype-clx.

Source

truetype-clx.lisp.

Function: make-state (&optional antialias)

Wrapper around antialising and not antialiasing renderers.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: pt->pixels (pt-size dpi units/em)

px = funits*coeff. Function returns coeff.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: update-state (state paths &optional antialias)

Wrapper around antialising and not antialiasing renderers.

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: xmax (bounding-box)

Returns right side x of @var{bounding-box}

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: xmin (bounding-box)

Returns left side x of @var{bounding-box}

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: ymax (bounding-box)

Returns top side y of @var{bounding-box}

Package

truetype-clx.

Source

truetype-clx.lisp.

Function: ymin (bounding-box)

Returns bottom side y of @var{bounding-box}

Package

truetype-clx.

Source

truetype-clx.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   B   C   F   M   P   T   U   X   Y  
Index Entry  Section

A
aa-bin/update-state: Private ordinary functions

B
baseline-to-baseline: Public ordinary functions

C
cells-sweep: Private ordinary functions
clamp: Private ordinary functions
clamp-alpha: Private ordinary functions

F
font-ascent: Public ordinary functions
font-descent: Public ordinary functions
font-line-gap: Public ordinary functions
Function, aa-bin/update-state: Private ordinary functions
Function, baseline-to-baseline: Public ordinary functions
Function, cells-sweep: Private ordinary functions
Function, clamp: Private ordinary functions
Function, clamp-alpha: Private ordinary functions
Function, font-ascent: Public ordinary functions
Function, font-descent: Public ordinary functions
Function, font-line-gap: Public ordinary functions
Function, make-state: Private ordinary functions
Function, pt->pixels: Private ordinary functions
Function, text-bounding-box: Public ordinary functions
Function, text-height: Public ordinary functions
Function, text-line-bounding-box: Public ordinary functions
Function, text-line-height: Public ordinary functions
Function, text-line-pixarray: Public ordinary functions
Function, text-line-width: Public ordinary functions
Function, text-pixarray: Public ordinary functions
Function, text-width: Public ordinary functions
Function, update-state: Private ordinary functions
Function, xmax: Private ordinary functions
Function, xmin: Private ordinary functions
Function, ymax: Private ordinary functions
Function, ymin: Private ordinary functions

M
make-state: Private ordinary functions

P
pt->pixels: Private ordinary functions

T
text-bounding-box: Public ordinary functions
text-height: Public ordinary functions
text-line-bounding-box: Public ordinary functions
text-line-height: Public ordinary functions
text-line-pixarray: Public ordinary functions
text-line-width: Public ordinary functions
text-pixarray: Public ordinary functions
text-width: Public ordinary functions

U
update-state: Private ordinary functions

X
xmax: Private ordinary functions
xmin: Private ordinary functions

Y
ymax: Private ordinary functions
ymin: Private ordinary functions


A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*inch/pts*: Private special variables

S
Special Variable, *inch/pts*: Private special variables