textlayout

module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT

README

Text layout library for Golang API reference

This module provides a chain of tools to layout text. It is mainly a port of the following C libraries : Pango, fribidi, fontconfig, harfbuzz and graphite.

Overview

The package fonts provides the low level primitives to load and read font files. The selection of a font given some criterion (like language or style) is facilitated by the fontconfig package. Once a font is selected, harfbuzz is responsible for laying out a line of text, that is transforming a sequence of unicode points (runes) to a sequence of positionned glyphs. Graphite fonts are supported via the graphite package. fribidi provides support for bidirectional text : it finds the alternates LTR and RTL sequences (embedding levels) in a paragraph. Finally, pango wraps these tools to provide an higher level interface capable of laying out an entire text.

Status of the project

This project is a work in progress. Some parts of it are already usable : fribidi, fonts/truetype, harfbuzz and graphite, but breaking changes may be committed on the fly.

Licensing

This module is licensed as MIT, but some packages (fribidi, pango) are derivative work and thus licensed as LGPL.

Directories

Path Synopsis
Package fontconfig provides a way to list the fonts of a system and to query the best match with user defined criteria.
Package fontconfig provides a way to list the fonts of a system and to query the best match with user defined criteria.
lang
Read a set of language orthographies and build Go declarations for charsets which can then be used to identify which languages are supported by a given font.
Read a set of language orthographies and build Go declarations for charsets which can then be used to identify which languages are supported by a given font.
Package fonts provides supports for parsing several font formats (postscript, bitmap and truetype) and provides a common API, inspired by freetype.
Package fonts provides supports for parsing several font formats (postscript, bitmap and truetype) and provides a common API, inspired by freetype.
binaryreader
Package binaryreader provides a convenient reader to decode (big endian) binary content.
Package binaryreader provides a convenient reader to decode (big endian) binary content.
bitmap
Pacakge bitmap provides support for bitmap fonts found in .pcf files.
Pacakge bitmap provides support for bitmap fonts found in .pcf files.
glyphsnames
copied from https://git.maze.io/go/unipdf/src/branch/master/internal/textencoding
copied from https://git.maze.io/go/unipdf/src/branch/master/internal/textencoding
psinterpreter
Package psinterpreter implement a Postscript interpreter required to parse .CFF files, and Type1 and Type2 Charstrings.
Package psinterpreter implement a Postscript interpreter required to parse .CFF files, and Type1 and Type2 Charstrings.
simpleencodings
Simple encodings map a subset of the unicode characters (at most 256) to a set of single bytes.
Simple encodings map a subset of the unicode characters (at most 256) to a set of single bytes.
truetype
Package truetype provides support for OpenType and TrueType font formats, used in PDF.
Package truetype provides support for OpenType and TrueType font formats, used in PDF.
type1
Package type1 implements a parser for Adobe Type1 fonts, defined by .afm files (https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf) and .pdf files (https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/T1_SPEC.pdf)
Package type1 implements a parser for Adobe Type1 fonts, defined by .afm files (https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf) and .pdf files (https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/T1_SPEC.pdf)
type1C
Package type1c provides a parser for the CFF font format defined at https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf.
Package type1c provides a parser for the CFF font format defined at https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf.
Package fribidi is a Golang port of the C/C++ Free Implementation of the Unicode Bidirectional Algorithm (https://github.com/fribidi/fribidi).
Package fribidi is a Golang port of the C/C++ Free Implementation of the Unicode Bidirectional Algorithm (https://github.com/fribidi/fribidi).
Package graphite Graphite implements a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world.
Package graphite Graphite implements a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world.
Package harfbuzz provides advanced text layout for various scripts and languages, with font-aware substitutions and positionning.
Package harfbuzz provides advanced text layout for various scripts and languages, with font-aware substitutions and positionning.
langs
Generator of the mapping from OpenType tags to BCP 47 tags && vice versa.
Generator of the mapping from OpenType tags to BCP 47 tags && vice versa.
track_reference
Script aiming at checking the progress of the reference implementation, using Git.
Script aiming at checking the progress of the reference implementation, using Git.
Package pango is a port of the C library, which provides international text layout.
Package pango is a port of the C library, which provides international text layout.
color
Package color implements a tool to generate the values of common colors supported by pango.
Package color implements a tool to generate the values of common colors supported by pango.
fcfonts
Package fcfonts is an implementation of the font tooling required by Pango, using textlayout/fontconfig and textlayout/fonts.
Package fcfonts is an implementation of the font tooling required by Pango, using textlayout/fontconfig and textlayout/fonts.
Package unicodedata provides additional lookup functions for unicode properties, not covered by the standard package unicode.
Package unicodedata provides additional lookup functions for unicode properties, not covered by the standard package unicode.
generate
Generate lookup function for Unicode properties not covered by the standard package unicode.
Generate lookup function for Unicode properties not covered by the standard package unicode.

Jump to

Keyboard shortcuts

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