fcfonts

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MIT, LGPL-2.1 Imports: 9 Imported by: 0

Documentation

Overview

Package fcfonts is an implementation of the font tooling required by Pango, using textlayout/fontconfig and textlayout/fonts.

Index

Constants

View Source
const Fontset_CACHE_SIZE = 256

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	// GetCharset returns a charset given a font that
	// includes a list of supported characters in the font.
	// The implementation must be fast because the method is called
	// separately for each character to determine Unicode coverage.
	GetCharset(font *fcFont) fc.Charset

	// GetGlyph returns a single glyph for a given Unicode code point.
	GetGlyph(font *fcFont, r rune) pango.Glyph
}

Decoder represents a decoder that an application provides for handling a font that is encoded in a custom way.

type Font

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

func (*Font) Describe

func (font *Font) Describe(absolute bool) pango.FontDescription

func (*Font) GetCoverage

func (font *Font) GetCoverage(_ pango.Language) pango.Coverage

func (*Font) GetFeatures

func (font *Font) GetFeatures() []harfbuzz.Feature

func (*Font) GetFontMap

func (font *Font) GetFontMap() pango.FontMap

func (*Font) GetHBFont

func (font *Font) GetHBFont() *harfbuzz.Font

func (*Font) GetMetrics

func (font *Font) GetMetrics(lang pango.Language) pango.FontMetrics

func (*Font) GlyphExtents

func (font *Font) GlyphExtents(glyph pango.Glyph, inkRect, logicalRect *pango.Rectangle)

type FontMap

type FontMap struct {
	Fontset_key_substitute func(*PangoFontsetKey, fc.Pattern)
	// contains filtered or unexported fields
}

FontMap implements pango.FontMap using 'fontconfig' and 'fonts'.

func NewFontMap

func NewFontMap() *FontMap

NewFontMap creates a new font map, used to cache information about available fonts, and holds certain global parameters such as the resolution and the default substitute function.

func (*FontMap) GetSerial

func (fontmap *FontMap) GetSerial() uint

func (*FontMap) LoadFontset

func (fontmap *FontMap) LoadFontset(context *pango.Context, desc *pango.FontDescription, language pango.Language) pango.Fontset

type Fontset

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

func (*Fontset) Foreach

func (Fontset *Fontset) Foreach(fn pango.FontsetForeachFunc)

func (*Fontset) GetLanguage

func (Fontset *Fontset) GetLanguage() pango.Language

type FontsetHash

type FontsetHash map[PangoFontsetKey]*Fontset

type PangoFcFontKey

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

type PangoFcMetricsInfo

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

type PangoFontsetKey

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

type PatternHash

type PatternHash map[string]*Patterns

type Patterns

type Patterns struct {
	Fontset fc.Fontset
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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