repository

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package repository implements font repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FontRepository

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

func (*FontRepository) AddUTF8Font

func (r *FontRepository) AddUTF8Font(family string, style fontstyle.Type, file string) Repository

AddUTF8Font adds a custom font to the repository.

func (*FontRepository) AddUTF8FontFromBytes

func (r *FontRepository) AddUTF8FontFromBytes(family string, style fontstyle.Type, bytes []byte) Repository

AddUTF8FontFromBytes adds a custom font to the repository from a byte slice.

func (*FontRepository) Load

func (r *FontRepository) Load() ([]*entity.CustomFont, error)

Load loads all custom fonts.

type Repository

type Repository interface {
	AddUTF8Font(family string, style fontstyle.Type, file string) Repository
	AddUTF8FontFromBytes(family string, style fontstyle.Type, bytes []byte) Repository
	Load() ([]*entity.CustomFont, error)
}

Repository is the abstraction to load custom fonts.

func New

func New() Repository

New creates a new repository.

Jump to

Keyboard shortcuts

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