Skip to content

Commit 0fc3f92

Browse files
author
rdon
committed
chore: code format
1 parent a60ab1a commit 0fc3f92

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

const1bit/const1bit.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ func (font *Font) GetGlyph(r rune) tinyfont.Glypher {
104104
}
105105

106106
offset := uint32(font.OffsetMap[s*6+3])<<16 + uint32(font.OffsetMap[s*6+4])<<8 + uint32(font.OffsetMap[s*6+5])
107-
108107
sz := uint32(len(font.Data[offset+5:]))
109108
if s*6+6 < len(font.OffsetMap) {
110109
sz = uint32(font.OffsetMap[s*6+9])<<16 + uint32(font.OffsetMap[s*6+10])<<8 + uint32(font.OffsetMap[s*6+11]) - offset
@@ -117,5 +116,5 @@ func (font *Font) GetGlyph(r rune) tinyfont.Glypher {
117116
font.glyph.XOffset = int8(font.Data[offset+3])
118117
font.glyph.YOffset = int8(font.Data[offset+4])
119118
font.glyph.Bitmaps = []byte(font.Data[offset+5 : offset+5+sz])
120-
return &font.glyph
119+
return &(font.glyph)
121120
}

const2bit/const2bit.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ func (font *Font) GetGlyph(r rune) tinyfont.Glypher {
110110
}
111111

112112
offset := uint32(font.OffsetMap[s*6+3])<<16 + uint32(font.OffsetMap[s*6+4])<<8 + uint32(font.OffsetMap[s*6+5])
113-
114113
sz := uint32(len(font.Data[offset+5:]))
115114
if s*6+6 < len(font.OffsetMap) {
116115
sz = uint32(font.OffsetMap[s*6+9])<<16 + uint32(font.OffsetMap[s*6+10])<<8 + uint32(font.OffsetMap[s*6+11]) - offset
@@ -123,5 +122,5 @@ func (font *Font) GetGlyph(r rune) tinyfont.Glypher {
123122
font.glyph.XOffset = int8(font.Data[offset+3])
124123
font.glyph.YOffset = int8(font.Data[offset+4])
125124
font.glyph.Bitmaps = []byte(font.Data[offset+5 : offset+5+sz])
126-
return &font.glyph
125+
return &(font.glyph)
127126
}

0 commit comments

Comments
 (0)