multiface

package module
v0.0.0-...-f51f19d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 4 Imported by: 6

README

multiface

This package provides a font.Face with fallback for missing glyphs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Face

type Face struct {
	// contains filtered or unexported fields
}

func (*Face) AddFace

func (f *Face) AddFace(face font.Face)

AddFace adds a font.Face to the multiface.Face

DO NOT USE this for Truetype fonts. github.com/golang/freetype/truetype.Face methods return ok = true even when the glyph could not be found in the font.

func (*Face) AddTruetypeFace

func (f *Face) AddTruetypeFace(face font.Face, fnt *truetype.Font)

func (*Face) Close

func (f *Face) Close() error

func (*Face) Glyph

func (f *Face) Glyph(dot fixed.Point26_6, r rune) (dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool)

func (*Face) GlyphAdvance

func (f *Face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool)

func (*Face) GlyphBounds

func (f *Face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool)

func (*Face) Kern

func (f *Face) Kern(r0, r1 rune) fixed.Int26_6

func (*Face) Metrics

func (f *Face) Metrics() font.Metrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL