Update d2renderers/d2fonts/d2fonts.go
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
This commit is contained in:
parent
6f74209a78
commit
194fb58027
1 changed files with 1 additions and 2 deletions
|
|
@ -222,8 +222,7 @@ func AddFont(fontLoc string) (FontFamily, error) {
|
|||
if fontLoc == "" {
|
||||
return "", nil
|
||||
}
|
||||
splitFont := strings.Split(fontLoc, "/")
|
||||
fontFileName := splitFont[len(splitFont)-1]
|
||||
fontFileName := filepath.Base(fontLoc)
|
||||
|
||||
ext := filepath.Ext(fontFileName)
|
||||
if ext != ".ttf" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue