Skip to content

Commit 8de7711

Browse files
author
Bernard Xie
committedMay 31, 2023
fix
1 parent ba3e43a commit 8de7711

File tree

447 files changed

+1768
-872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+1768
-872
lines changed
 

‎d2renderers/d2fonts/d2fonts.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import (
1010
"fmt"
1111
"strings"
1212

13-
"github.com/jung-kurt/gofpdf"
14-
13+
"oss.terrastruct.com/d2/lib/font"
1514
fontlib "oss.terrastruct.com/d2/lib/font"
1615
)
1716

@@ -44,7 +43,7 @@ func (f Font) GetEncodedSubset(corpus string) string {
4443

4544
fontBuf := make([]byte, len(FontFaces[f]))
4645
copy(fontBuf, FontFaces[f])
47-
fontBuf = gofpdf.UTF8CutFont(fontBuf, uniqueChars)
46+
fontBuf = font.UTF8CutFont(fontBuf, uniqueChars)
4847

4948
fontBuf, err := fontlib.Sfnt2Woff(fontBuf)
5049
if err != nil {

‎d2renderers/d2fonts/d2fonts_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import (
44
"path/filepath"
55
"testing"
66

7-
"github.com/jung-kurt/gofpdf"
8-
7+
"oss.terrastruct.com/d2/lib/font"
98
"oss.terrastruct.com/util-go/assert"
109
"oss.terrastruct.com/util-go/diff"
1110
)
@@ -17,7 +16,7 @@ func TestCutFont(t *testing.T) {
1716
}
1817
fontBuf := make([]byte, len(FontFaces[f]))
1918
copy(fontBuf, FontFaces[f])
20-
fontBuf = gofpdf.UTF8CutFont(fontBuf, " 1")
19+
fontBuf = font.UTF8CutFont(fontBuf, " 1")
2120
err := diff.Testdata(filepath.Join("testdata", "d2fonts", "cut"), ".txt", fontBuf)
2221
assert.Success(t, err)
2322
}

0 commit comments

Comments
 (0)
Failed to load comments.