mirror of
https://github.com/bestnite/font-mapper.git
synced 2025-10-28 09:43:54 +00:00
init
This commit is contained in:
22
glyph_search_test.go
Normal file
22
glyph_search_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGlyphOutlineMapper_MappingRune(t *testing.T) {
|
||||
readFontData, _ := os.ReadFile("read.ttf")
|
||||
miLantingFontData, _ := os.ReadFile("MI LANTING.ttf")
|
||||
mapper, err := NewGlyphOutlineMapper(readFontData, miLantingFontData)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
mapper.SetConcurrent(50)
|
||||
specialRune, standardRune, ok := mapper.MappingRune(0xE000)
|
||||
if !ok {
|
||||
t.Log("empty font data")
|
||||
}
|
||||
fmt.Printf("specialRune: %s => standardRune: %s\n", string(specialRune), string(standardRune))
|
||||
}
|
||||
Reference in New Issue
Block a user