bitmapfont

package module
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 7

README

bitmapfont (v2)

PkgGoDev

Package bitmapfont offers a font.Face value of some bitmap fonts.

12px glyphs (Face / FaceEA)

Example

The EA version includes wide glyphs for the characters that have East Asian ambiguous widths (e.g., , , α).

Sources

There is one font face with glyph size 6x13 for halfwidth, and 12x13 for fullwidth so far.

Baekmuk License

Copyright (c) 1986-2002 Kim Jeong-Hwan
All rights reserved.

Permission to use, copy, modify and distribute this font is
hereby granted, provided that both the copyright notice and
this permission notice appear in all copies of the font,
derivative works or modified versions, and that the following
acknowledgement appear in supporting documentation:
    Baekmuk Batang, Baekmuk Dotum, Baekmuk Gulim, and
    Baekmuk Headline are registered trademarks owned by
    Kim Jeong-Hwan.

M+ Bitmap Font License

-
M+ BITMAP FONTS            Copyright 2002-2005  COZ <coz@users.sourceforge.jp>
-

LICENSE




These fonts are free softwares.
Unlimited permission is granted to use, copy, and distribute it, with
or without modification, either commercially and noncommercially.
THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.

Documentation

Overview

Package bitmapfont offers a font.Face value of some bitmap fonts.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Face is a font.Face of the bitmap font (12px regular).
	Face font.Face

	// FaceEA is a font.Face of the bitmap font (12px regular, prefer East Asian wide characters).
	FaceEA font.Face
)

Functions

func PresentationForms added in v2.1.0

func PresentationForms(input string, defaultDirection Direction, lang language.Tag) string

PresentationForms returns runes as presentation forms in order to render it easily.

PresentationForms mainly converts RTL texts into LTR glyphs for presentation. The result can be passed to e.g., golang.org/x/image.Drawer's DrawString. PresentationForms should work with texts whose directions are mixed with Unicode Bidi algorithm [1].

lang represents a language that is a hint to compose the representation forms. lang is not used in the implementation yet, but might be used in the future.

[1] https://unicode.org/reports/tr9/

Types

type Direction added in v2.1.0

type Direction int
const (
	DirectionLeftToRight Direction = iota
	DirectionRightToLeft
)

Directories

Path Synopsis
internal
bdf
wqi

Jump to

Keyboard shortcuts

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