Skip to content

Commit

Permalink
add license/readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ToadKing committed Dec 1, 2023
1 parent dab55f1 commit c0a47a6
Show file tree
Hide file tree
Showing 5 changed files with 524 additions and 2 deletions.
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2023 SteelSeries ApS

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# unifont

A go library for using [GNU Unifont](https://unifoundry.com/unifont/index.html) with Go. Implements
the `golang.org/x/image/font.Face` interface for using with that package.

## Use

import "github.com/steelseries/unifont"

...

uf, err := unifont.ParseHexFile("unifont.hex")
if err != nil {
panic(err)
}

face, err := unifont.NewFace(uf, 1)
if err != nil {
panic(err)
}

// use face like any other font.Face, with font.Drawer/etc.
1 change: 0 additions & 1 deletion combining.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
//
// This will generate a combined.txt file containing all the combining character offsets.
func (u *Unifont) CombiningInfo(s io.Reader) error {

scanner := bufio.NewScanner(s)

// To avoid modifying info in case of an error, save all the changes we'll do before we
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/toadking/unifont
module github.com/steelseries/unifont

go 1.21

Expand Down
Loading

0 comments on commit c0a47a6

Please sign in to comment.