README

bikallem/freetype/types does not have a README file

#
BBox

type BBox derive(Eq, Show, ToJson)

Bounding box.

#
BBox::empty

fn BBox::empty() -> BBox

#
BBox::new

fn BBox::new(x_min : Int64, y_min : Int64, x_max : Int64, y_max : Int64) -> BBox

#
BBox::x_max

fn BBox::x_max(self : BBox) -> Int64

#
BBox::x_min

fn BBox::x_min(self : BBox) -> Int64

#
BBox::y_max

fn BBox::y_max(self : BBox) -> Int64

#
BBox::y_min

fn BBox::y_min(self : BBox) -> Int64

#
Bitmap

type Bitmap derive(Eq, Show)

Bitmap image.

#
Bitmap::buffer

fn Bitmap::buffer(self : Bitmap) -> Bytes

#
Bitmap::new

fn Bitmap::new() -> Bitmap

#
Bitmap::num_grays

fn Bitmap::num_grays(self : Bitmap) -> UInt

#
Bitmap::pitch

fn Bitmap::pitch(self : Bitmap) -> Int

#
Bitmap::pixel_mode

fn Bitmap::pixel_mode(self : Bitmap) -> PixelMode

#
Bitmap::rows

fn Bitmap::rows(self : Bitmap) -> UInt

#
Bitmap::set_buffer

fn Bitmap::set_buffer(self : Bitmap, v : Bytes) -> Unit

#
Bitmap::set_num_grays

fn Bitmap::set_num_grays(self : Bitmap, v : UInt) -> Unit

#
Bitmap::set_pitch

fn Bitmap::set_pitch(self : Bitmap, v : Int) -> Unit

#
Bitmap::set_pixel_mode

fn Bitmap::set_pixel_mode(self : Bitmap, v : PixelMode) -> Unit

#
Bitmap::set_rows

fn Bitmap::set_rows(self : Bitmap, v : UInt) -> Unit

#
Bitmap::set_width

fn Bitmap::set_width(self : Bitmap, v : UInt) -> Unit

#
Bitmap::width

fn Bitmap::width(self : Bitmap) -> UInt

#
Color

type Color derive(Eq, Show)

Non-premultiplied BGRA color, matching FreeType's FT_Color layout.

#
Color::alpha

fn Color::alpha(self : Color) -> Byte

#
Color::blue

fn Color::blue(self : Color) -> Byte

#
Color::green

fn Color::green(self : Color) -> Byte

#
Color::new

fn Color::new(blue : Byte, green : Byte, red : Byte, alpha : Byte) -> Color

#
Color::red

fn Color::red(self : Color) -> Byte

#
CurveTag

pub(all) enum CurveTag {
On
Conic
Cubic
} derive(Eq, Show)

Curve point classification.

#
CurveTag::from_byte

fn CurveTag::from_byte(b : Byte) -> CurveTag

Convert a raw tag byte to a CurveTag, masking to the low 2 bits.

#
GlyphFormat

pub(all) enum GlyphFormat {
None
Composite
Bitmap
Outline
Plotter
Svg
} derive(Eq, Show)

Format of glyph image data.

#
GlyphMetrics

type GlyphMetrics derive(Eq, Show, ToJson)

Glyph metrics (in font units or 26.6).

#
GlyphMetrics::height

fn GlyphMetrics::height(self : GlyphMetrics) -> Int64

#
GlyphMetrics::hori_advance

fn GlyphMetrics::hori_advance(self : GlyphMetrics) -> Int64

#
GlyphMetrics::hori_bearing_x

fn GlyphMetrics::hori_bearing_x(self : GlyphMetrics) -> Int64

#
GlyphMetrics::hori_bearing_y

fn GlyphMetrics::hori_bearing_y(self : GlyphMetrics) -> Int64

#
GlyphMetrics::new

#
GlyphMetrics::set_height

fn GlyphMetrics::set_height(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_hori_advance

fn GlyphMetrics::set_hori_advance(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_hori_bearing_x

fn GlyphMetrics::set_hori_bearing_x(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_hori_bearing_y

fn GlyphMetrics::set_hori_bearing_y(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_vert_advance

fn GlyphMetrics::set_vert_advance(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_vert_bearing_x

fn GlyphMetrics::set_vert_bearing_x(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_vert_bearing_y

fn GlyphMetrics::set_vert_bearing_y(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::set_width

fn GlyphMetrics::set_width(self : GlyphMetrics, v : Int64) -> Unit

#
GlyphMetrics::vert_advance

fn GlyphMetrics::vert_advance(self : GlyphMetrics) -> Int64

#
GlyphMetrics::vert_bearing_x

fn GlyphMetrics::vert_bearing_x(self : GlyphMetrics) -> Int64

#
GlyphMetrics::vert_bearing_y

fn GlyphMetrics::vert_bearing_y(self : GlyphMetrics) -> Int64

#
GlyphMetrics::width

fn GlyphMetrics::width(self : GlyphMetrics) -> Int64

#
Outline

type Outline derive(Eq, Show)

Outline representation: a set of contours made of points.

#
Outline::contours

fn Outline::contours(self : Outline) -> FixedArray[UInt]

#
Outline::create

fn Outline::create(points : FixedArray[Vector], tags : FixedArray[Byte], contours : FixedArray[UInt], flags? : Int) -> Outline

#
Outline::create_with_counts

fn Outline::create_with_counts(points : FixedArray[Vector], tags : FixedArray[Byte], contours : FixedArray[UInt], n_points : Int, n_contours : Int) -> Outline

Create an outline with explicit point/contour counts. Used when arrays may be larger than the actual data (reusable buffers).

#
Outline::flags

fn Outline::flags(self : Outline) -> Int

#
Outline::n_contours

fn Outline::n_contours(self : Outline) -> Int

#
Outline::n_points

fn Outline::n_points(self : Outline) -> Int

#
Outline::new

fn Outline::new() -> Outline

#
Outline::points

fn Outline::points(self : Outline) -> FixedArray[Vector]

#
Outline::set_contours

fn Outline::set_contours(self : Outline, contours : FixedArray[UInt]) -> Unit

#
Outline::set_flags

fn Outline::set_flags(self : Outline, flags : Int) -> Unit

#
Outline::set_points

fn Outline::set_points(self : Outline, points : FixedArray[Vector]) -> Unit

#
Outline::set_tags

fn Outline::set_tags(self : Outline, tags : FixedArray[Byte]) -> Unit

#
Outline::tags

fn Outline::tags(self : Outline) -> FixedArray[Byte]

#
PaletteData

type PaletteData derive(Eq, Show)

Public palette metadata mirroring FreeType's FT_Palette_Data.

#
PaletteData::new

fn PaletteData::new(num_palettes : UInt, palette_name_ids : Array[UInt], palette_flags : Array[UInt], num_palette_entries : UInt, palette_entry_name_ids : Array[UInt]) -> PaletteData

#
PaletteData::num_palette_entries

fn PaletteData::num_palette_entries(self : PaletteData) -> UInt

#
PaletteData::num_palettes

fn PaletteData::num_palettes(self : PaletteData) -> UInt

#
PaletteData::palette_entry_name_ids

fn PaletteData::palette_entry_name_ids(self : PaletteData) -> Array[UInt]

#
PaletteData::palette_flags

fn PaletteData::palette_flags(self : PaletteData) -> Array[UInt]

#
PaletteData::palette_name_ids

fn PaletteData::palette_name_ids(self : PaletteData) -> Array[UInt]

#
PixelMode

pub(all) enum PixelMode {
None
Mono
Gray
Gray2
Gray4
Lcd
LcdV
Bgra
} derive(Eq, Show)

Pixel mode for bitmaps.

#
SizeMetrics

type SizeMetrics derive(Eq, Show)

Size metrics (in 26.6).

#
SizeMetrics::ascender

fn SizeMetrics::ascender(self : SizeMetrics) -> Int64

#
SizeMetrics::descender

fn SizeMetrics::descender(self : SizeMetrics) -> Int64

#
SizeMetrics::height

fn SizeMetrics::height(self : SizeMetrics) -> Int64

#
SizeMetrics::max_advance

fn SizeMetrics::max_advance(self : SizeMetrics) -> Int64

#
SizeMetrics::new

fn SizeMetrics::new(x_ppem? : UInt, y_ppem? : UInt, x_scale? :
Fixed
, y_scale? :
Fixed
, ascender? : Int64, descender? : Int64, height? : Int64, max_advance? : Int64) -> SizeMetrics

#
SizeMetrics::set_ascender

fn SizeMetrics::set_ascender(self : SizeMetrics, v : Int64) -> Unit

#
SizeMetrics::set_descender

fn SizeMetrics::set_descender(self : SizeMetrics, v : Int64) -> Unit

#
SizeMetrics::set_height

fn SizeMetrics::set_height(self : SizeMetrics, v : Int64) -> Unit

#
SizeMetrics::set_max_advance

fn SizeMetrics::set_max_advance(self : SizeMetrics, v : Int64) -> Unit

#
SizeMetrics::set_x_ppem

fn SizeMetrics::set_x_ppem(self : SizeMetrics, v : UInt) -> Unit

#
SizeMetrics::set_x_scale

fn SizeMetrics::set_x_scale(self : SizeMetrics, v :
Fixed
) -> Unit

#
SizeMetrics::set_y_ppem

fn SizeMetrics::set_y_ppem(self : SizeMetrics, v : UInt) -> Unit

#
SizeMetrics::set_y_scale

fn SizeMetrics::set_y_scale(self : SizeMetrics, v :
Fixed
) -> Unit

#
SizeMetrics::x_ppem

fn SizeMetrics::x_ppem(self : SizeMetrics) -> UInt

#
SizeMetrics::x_scale

#
SizeMetrics::y_ppem

fn SizeMetrics::y_ppem(self : SizeMetrics) -> UInt

#
SizeMetrics::y_scale

#
Vector

type Vector derive(Eq, Show, ToJson)

2D vector with position values (font units, 16.16, or 26.6 depending on context).

#
Vector::new

fn Vector::new(x : Int64, y : Int64) -> Vector

#
Vector::x

fn Vector::x(self : Vector) -> Int64

#
Vector::y

fn Vector::y(self : Vector) -> Int64

#
CURVE_TAG_CONIC

let CURVE_TAG_CONIC : Byte

Off-curve conic (quadratic) control point. (legacy — prefer CurveTag::Conic)

#
CURVE_TAG_CUBIC

let CURVE_TAG_CUBIC : Byte

Off-curve cubic control point. (legacy — prefer CurveTag::Cubic)

#
CURVE_TAG_HAS_SCANMODE

let CURVE_TAG_HAS_SCANMODE : Byte

#
CURVE_TAG_ON

let CURVE_TAG_ON : Byte

On-curve point. (legacy — prefer CurveTag::On)

#
CURVE_TAG_TOUCH_BOTH

let CURVE_TAG_TOUCH_BOTH : Byte

#
CURVE_TAG_TOUCH_X

let CURVE_TAG_TOUCH_X : Byte

TrueType hinter: x-touched.

#
CURVE_TAG_TOUCH_Y

let CURVE_TAG_TOUCH_Y : Byte

TrueType hinter: y-touched.

#
OUTLINE_EVEN_ODD_FILL

let OUTLINE_EVEN_ODD_FILL : Int

#
OUTLINE_HIGH_PRECISION

let OUTLINE_HIGH_PRECISION : Int

#
OUTLINE_IGNORE_DROPOUTS

let OUTLINE_IGNORE_DROPOUTS : Int

#
OUTLINE_INCLUDE_STUBS

let OUTLINE_INCLUDE_STUBS : Int

#
OUTLINE_NONE

let OUTLINE_NONE : Int

#
OUTLINE_OVERLAP

let OUTLINE_OVERLAP : Int

#
OUTLINE_OWNER

let OUTLINE_OWNER : Int

#
OUTLINE_REVERSE_FILL

let OUTLINE_REVERSE_FILL : Int

#
OUTLINE_SINGLE_PASS

let OUTLINE_SINGLE_PASS : Int

#
OUTLINE_SMART_DROPOUTS

let OUTLINE_SMART_DROPOUTS : Int

#
TAG_AVAR

let TAG_AVAR : UInt

#
TAG_BASE

let TAG_BASE : UInt

#
TAG_BDAT

let TAG_BDAT : UInt

#
TAG_BDF

let TAG_BDF : UInt

#
TAG_BHED

let TAG_BHED : UInt

#
TAG_BLOC

let TAG_BLOC : UInt

#
TAG_BSLN

let TAG_BSLN : UInt

#
TAG_CBDT

let TAG_CBDT : UInt

#
TAG_CBLC

let TAG_CBLC : UInt

#
TAG_CFF

let TAG_CFF : UInt

#
TAG_CFF2

let TAG_CFF2 : UInt

#
TAG_CID

let TAG_CID : UInt

#
TAG_CMAP

let TAG_CMAP : UInt

#
TAG_COLR

let TAG_COLR : UInt

#
TAG_CPAL

let TAG_CPAL : UInt

#
TAG_CVAR

let TAG_CVAR : UInt

#
TAG_CVT

let TAG_CVT : UInt

#
TAG_DSIG

let TAG_DSIG : UInt

#
TAG_EBDT

let TAG_EBDT : UInt

#
TAG_EBLC

let TAG_EBLC : UInt

#
TAG_EBSC

let TAG_EBSC : UInt

#
TAG_FEAT

let TAG_FEAT : UInt

#
TAG_FOND

let TAG_FOND : UInt

#
TAG_FPGM

let TAG_FPGM : UInt

#
TAG_FVAR

let TAG_FVAR : UInt

#
TAG_GASP

let TAG_GASP : UInt

#
TAG_GDEF

let TAG_GDEF : UInt

#
TAG_GLYF

let TAG_GLYF : UInt

#
TAG_GPOS

let TAG_GPOS : UInt

#
TAG_GSUB

let TAG_GSUB : UInt

#
TAG_GVAR

let TAG_GVAR : UInt

#
TAG_HDMX

let TAG_HDMX : UInt

#
TAG_HEAD

let TAG_HEAD : UInt

#
TAG_HHEA

let TAG_HHEA : UInt

#
TAG_HMTX

let TAG_HMTX : UInt

#
TAG_HVAR

let TAG_HVAR : UInt

#
TAG_JSTF

let TAG_JSTF : UInt

#
TAG_JUST

let TAG_JUST : UInt

#
TAG_KERN

let TAG_KERN : UInt

#
TAG_LCAR

let TAG_LCAR : UInt

#
TAG_LOCA

let TAG_LOCA : UInt

#
TAG_LTSH

let TAG_LTSH : UInt

#
TAG_LWFN

let TAG_LWFN : UInt

#
TAG_MATH

let TAG_MATH : UInt

#
TAG_MAXP

let TAG_MAXP : UInt

#
TAG_META

let TAG_META : UInt

#
TAG_MMFX

let TAG_MMFX : UInt

#
TAG_MMSD

let TAG_MMSD : UInt

#
TAG_MORT

let TAG_MORT : UInt

#
TAG_MORX

let TAG_MORX : UInt

#
TAG_MVAR

let TAG_MVAR : UInt

#
TAG_NAME

let TAG_NAME : UInt

#
TAG_OPBD

let TAG_OPBD : UInt

#
TAG_OS2

let TAG_OS2 : UInt

#
TAG_OTTO

let TAG_OTTO : UInt

#
TAG_PCLT

let TAG_PCLT : UInt

#
TAG_POST

let TAG_POST : UInt

#
TAG_POST_LC

let TAG_POST_LC : UInt

#
TAG_PREP

let TAG_PREP : UInt

#
TAG_PROP

let TAG_PROP : UInt

#
TAG_SBIX

let TAG_SBIX : UInt

#
TAG_SFNT

let TAG_SFNT : UInt

#
TAG_SING

let TAG_SING : UInt

#
TAG_SVG

let TAG_SVG : UInt

#
TAG_TRAK

let TAG_TRAK : UInt

#
TAG_TRUE

let TAG_TRUE : UInt

#
TAG_TTC

let TAG_TTC : UInt

#
TAG_TTCF

let TAG_TTCF : UInt

#
TAG_TYP1

let TAG_TYP1 : UInt

#
TAG_TYP1_LC

let TAG_TYP1_LC : UInt

#
TAG_VDMX

let TAG_VDMX : UInt

#
TAG_VHEA

let TAG_VHEA : UInt

#
TAG_VMTX

let TAG_VMTX : UInt

#
TAG_VVAR

let TAG_VVAR : UInt

#
TAG_WOF2

let TAG_WOF2 : UInt

#
TAG_WOFF

let TAG_WOFF : UInt

#
curve_tag

fn curve_tag(flag : Byte) -> Byte

Extract curve tag from point flag byte.

#
make_tag

fn make_tag(c1 : Byte, c2 : Byte, c3 : Byte, c4 : Byte) -> UInt

Construct a 4-byte tag from four characters (big-endian).