diff --git a/CHANGELOG.md b/CHANGELOG.md index 7785b2b..e8dca38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +0.7.0 +--- +- **all** + - fix: GetGlyph falls back to index 0 when rune is not found +- **build** + - use TinyGo latest release for CI builds +- **docs** + - add font licensing information to README +- **tinyfontgen-ttf** + - bugfix for generating multiple fonts +- **fontpreview** + - add font preview generator and README samples + + +0.6.0 +--- +- **modules** + - update to drivers 0.31.0 + + 0.5.0 --- - **all** diff --git a/LICENSE b/LICENSE index 71a783f..3d048b5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019-2024 TinyGo Authors. All rights reserved. +Copyright (c) The TinyGo Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/README.md b/README.md index 2de7801..1c02862 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,90 @@ TinyFont [![Build](https://github.com/tinygo-org/tinyfont/actions/workflows/build.yml/badge.svg?branch=dev)](https://github.com/tinygo-org/tinyfont/actions/workflows/build.yml) -TinyFont is a font/text package for [TinyGo](https://tinygo.org/) displays. It is heavily based on [Adafruit's GFX library](https://github.com/adafruit/Adafruit-GFX-Library). +TinyFont is a font/text package for [TinyGo](https://tinygo.org/) displays. It is heavily influenced by [Adafruit's GFX library](https://github.com/adafruit/Adafruit-GFX-Library). ![example](./images/tinyfont.png) ![example](./images/rubikmoonrocks.png) -This package is experimental and may change in the future. It has not been optimized for speed or memory.. +This package is experimental and may change in the future. It has not been optimized for speed or memory. -## Faster compilation -During compilation, tinygo will go through all the font files in a package and them discard them if not used. To improve compilation time considerably, move the files you are going to use to a new package. +## Current Fonts + +### freemono + +![freemono sample](./images/freemono.png) + +A monospaced serif font from the GNU FreeFont project. Available in regular, bold, oblique, and bold oblique styles at 9, 12, 18, and 24pt. Licensed under GPL v3. + +### freesans + +![freesans sample](./images/freesans.png) + +A sans-serif font from the GNU FreeFont project. Available in regular, bold, oblique, and bold oblique styles at 9, 12, 18, and 24pt. Licensed under GPL v3. + +### freeserif + +![freeserif sample](./images/freeserif.png) + +A proportional serif font from the GNU FreeFont project. Available in regular, bold, italic, and bold italic styles at 9, 12, 18, and 24pt. Licensed under GPL v3. + +### gophers + +![gophers sample](./images/gophers.png) + +A decorative font featuring Go gopher-themed glyphs, created by @rakyll. Available at 14, 18, 22, 32, 58, and 121pt. Licensed under CC BY-NC 4.0. + +### notoemoji + +![notoemoji sample](./images/notoemoji.png) + +Google's Noto Emoji font, providing a wide range of emoji glyphs. Available at 12, 16, and 20pt. Licensed under SIL Open Font License. + +### notosans + +![notosans sample](./images/notosans.png) + +Google's Noto Sans font, designed to support text in all languages with a clean sans-serif appearance. Available at 12pt. Licensed under SIL Open Font License. + +### proggy + +![proggy sample](./images/proggy.png) + +The classic Proggy programming font, a pixel-perfect monospaced bitmap font well suited for small displays. Available at 8pt. + +### shnm + +![shnm sample](./images/shnm.png) + +The Shinonome (東雲) bitmap font family, a Japanese BDF bitmap font supporting Latin and JIS character sets. Available at 12pt. Licensed under a permissive open license from The Electronic Font Open Laboratory. + +### org_01 + +![org_01 sample](./images/org_01.png) + +Org_v01 by Orgdot. A tiny, stylized font with all characters fitting within a 6-pixel height. + +### picopixel + +![picopixel sample](./images/picopixel.png) + +Picopixel by Sébastien Matos. A tiny pixel font with all characters fitting within a 6-pixel height. + +### tiny3x3a2pt7b + +![tiny3x3a2pt7b sample](./images/tiny3x3a2pt7b.png) + +"Tiny3x3a" from FontStruct by Michaelangel007. An extremely compact 3×3 pixel font. Licensed under CC BY-NC-SA 3.0. + +### tomthumb + +![tomthumb sample](./images/tomthumb.png) + +Tom Thumb, a 3×5 pixel monospaced bitmap font originally by Brian J. Swetland. One of the smallest legible fonts available. Licensed under the BSD 3-Clause License. ## About the fonts + The fonts compiled here were just converted or made compatible, and the original authors should be given proper credit. Each font is under its own license, and while most of them are under an _open license_, there might be differences in its usage and conditions. ## Generate your own font @@ -24,6 +96,10 @@ You can use tinyfontgen to generate a tinyfont from a bdf/ttf font. https://github.com/tinygo-org/tinyfont/tree/release/cmd/tinyfontgen https://github.com/tinygo-org/tinyfont/tree/release/cmd/tinyfontgen-ttf +## Faster compilation + +During compilation, tinygo will go through all the font files in a package and them discard them if not used. To improve compilation time considerably, move the files you are going to use to a new package. + ## Incompatibility warning This package contains incompatible changes from [previous versions](https://github.com/tinygo-org/tinyfont/commit/a02e4495f8d64b671d923ec009e17c9da9e3e7f5). diff --git a/go.mod b/go.mod index 1cc6fb0..7705c0a 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/hajimehoshi/go-jisx0208 v1.0.0 github.com/sago35/go-bdf v0.0.0-20200313142241-6c17821c91c4 golang.org/x/image v0.0.0-20220617043117-41969df76e82 - tinygo.org/x/drivers v0.31.0 + tinygo.org/x/drivers v0.35.0 ) require ( diff --git a/go.sum b/go.sum index 49ce2f5..8785dd8 100644 --- a/go.sum +++ b/go.sum @@ -9,5 +9,7 @@ golang.org/x/image v0.0.0-20220617043117-41969df76e82/go.mod h1:doUCurBvlfPMKfmI golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -tinygo.org/x/drivers v0.31.0 h1:Q2RpvTRMtdmjHD2Xyn4e8WXsJZKpIny3Lg4hzG1dLu4= -tinygo.org/x/drivers v0.31.0/go.mod h1:ZdErNrApSABdVXjA1RejD67R8SNRI6RKVfYgQDZtKtk= +tinygo.org/x/drivers v0.34.0 h1:lw8ePJeUSn9oICKBvQXHC9TIE+J00OfXfkGTrpXM9Iw= +tinygo.org/x/drivers v0.34.0/go.mod h1:ZdErNrApSABdVXjA1RejD67R8SNRI6RKVfYgQDZtKtk= +tinygo.org/x/drivers v0.35.0 h1:cTK36tsI/S4Mg3hCPH0MBjV/ta7XKQ+wpvch4mVqgsE= +tinygo.org/x/drivers v0.35.0/go.mod h1:DQgKyHkB4G6IEOKVTAjApbKnWGwESN91EVJO+nMOE9Y= diff --git a/version.go b/version.go index cfa11e7..2e52198 100644 --- a/version.go +++ b/version.go @@ -4,4 +4,4 @@ package tinyfont // for support purposes. // // Update this value before release of new version of software. -const Version = "0.6.0" +const Version = "0.7.0"