rom

package
v0.0.0-...-205964d Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: MIT Imports: 12 Imported by: 0

README

ROMs

Here you will find raw (EEP)ROM dumps for original fonts. Also sometimes referred to as "raw" fonts. These files usually have the column stored in the bits, one byte per row.

To allow larger fonts with widths up to 16 pixels, we also support big endian encoded unsigned 16-bit values.

Maps

To help import the ROMs properly, we use maps with the following opcodes:

#         comment
@wxh      glyph width (w) and height (h) integer values
>1        right advance (added to width, can be negative) (number)
+n        skip count, number of bytes to be skipped in beginning of ROM (number)
-n        trim count, number of bytes to be skipped at the end of ROM (number)
=0x20     replacement character (number)
*0x20     offset, marks the first character (number)
u0x0020   unicode code point (array of numbers)

Documentation

Overview

Package rom contains tools to convert character ROMS to Go source files

This package is mainly for internal use in textmod.es/font/gen.go, used by "go generate" in the containing package.

Index

Constants

This section is empty.

Variables

View Source
var ROMs []*Collection

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Match func(string) bool
	Parse func(string) (*Map, error)
}

type Map

type Map struct {
	Name        string
	Comment     []string
	Encoding    string
	Size        image.Point
	Skip, Trim  int64
	Advance     int64
	Replacement rune
	Offset      rune
	CodePoints  []rune
	Data        []uint16
}

func ReadMap

func ReadMap(name string) (*Map, error)

func (*Map) ExportName

func (m *Map) ExportName() string

func (*Map) FacePackageFile

func (m *Map) FacePackageFile() string

func (*Map) FontName

func (m *Map) FontName() string

func (*Map) InternalName

func (m *Map) InternalName() string

func (*Map) PackageFile

func (m *Map) PackageFile() string

func (*Map) ROMSize

func (m *Map) ROMSize() int64

func (*Map) String

func (m *Map) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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