freetype

package
v0.0.0-...-4a525b6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 6 Imported by: 0

README

FreeType renderer

An implementation of the Renderer interface in the github.com/pekim/dull/internal/font/ package, using the FreeType library.

cgo is used to build freetype from source.

structure

  • cgo.go - provides compiler flags
  • renderer.go - implementation of the Renderer interface using FreeType
  • *.go - all other Go files simply use cgo to build a C file from the library source
    • filename - reflects a path in the library source, with /s replaced with _
  • lib - the directory contains an extracted source tarball

upgrade FreeType version

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRenderer

func NewRenderer(name string, fontData []byte, dpi int, height float64) (font.Renderer, error)

Types

type FreeType

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

func NewFreeType

func NewFreeType(dpi int) *FreeType

func (*FreeType) NewRenderer

func (ft *FreeType) NewRenderer(name string, fontData []byte, pixelHeight float64) (font.Renderer, error)

type RendererFreeType

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

func (*RendererFreeType) GetGlyph

func (r *RendererFreeType) GetGlyph(char rune) (*font.Glyph, error)

func (*RendererFreeType) GetMetrics

func (r *RendererFreeType) GetMetrics() *font.Metrics

func (*RendererFreeType) GetName

func (r *RendererFreeType) GetName() string

Jump to

Keyboard shortcuts

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