Skip to content

Commit f65118d

Browse files
committed
text/v2: use font.NewFace instead of &font.Face{}
Updates go-text/typesetting#237
1 parent 0fd3713 commit f65118d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/v2/gotextfacesource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func NewGoTextFaceSource(source io.Reader) (*GoTextFaceSource, error) {
160160
return nil, err
161161
}
162162

163-
s := newGoTextFaceSource(&font.Face{Font: f})
163+
s := newGoTextFaceSource(font.NewFace(f))
164164
return s, nil
165165
}
166166

@@ -182,7 +182,7 @@ func NewGoTextFaceSourcesFromCollection(source io.Reader) ([]*GoTextFaceSource,
182182
if err != nil {
183183
return nil, err
184184
}
185-
s := newGoTextFaceSource(&font.Face{Font: f})
185+
s := newGoTextFaceSource(font.NewFace(f))
186186
sources[i] = s
187187
}
188188
return sources, nil

0 commit comments

Comments
 (0)