mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-04 22:17:22 +08:00
fonts: remove unused field
This commit is contained in:
parent
999a9fc92e
commit
08c1fe4ed4
@ -70,7 +70,6 @@ func (rec *TtfType) MakeEncoder() (*textencoding.SimpleEncoder, error) {
|
||||
// TtfType describes a TrueType font file.
|
||||
// http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-chapter08
|
||||
type TtfType struct {
|
||||
Embeddable bool
|
||||
UnitsPerEm uint16
|
||||
PostScriptName string
|
||||
Bold bool
|
||||
@ -111,9 +110,9 @@ func (ttf *TtfType) MakeToUnicode() *cmap.CMap {
|
||||
|
||||
// String returns a human readable representation of `ttf`.
|
||||
func (ttf *TtfType) String() string {
|
||||
return fmt.Sprintf("FONT_FILE2{%#q Embeddable=%t UnitsPerEm=%d Bold=%t ItalicAngle=%f "+
|
||||
return fmt.Sprintf("FONT_FILE2{%#q UnitsPerEm=%d Bold=%t ItalicAngle=%f "+
|
||||
"CapHeight=%d Chars=%d GlyphNames=%d}",
|
||||
ttf.PostScriptName, ttf.Embeddable, ttf.UnitsPerEm, ttf.Bold, ttf.ItalicAngle,
|
||||
ttf.PostScriptName, ttf.UnitsPerEm, ttf.Bold, ttf.ItalicAngle,
|
||||
ttf.CapHeight, len(ttf.Chars), len(ttf.GlyphNames))
|
||||
}
|
||||
|
||||
@ -607,9 +606,7 @@ func (t *ttfParser) ParseOS2() error {
|
||||
return err
|
||||
}
|
||||
version := t.ReadUShort()
|
||||
t.Skip(3 * 2) // xAvgCharWidth, usWeightClass, usWidthClass
|
||||
fsType := t.ReadUShort()
|
||||
t.rec.Embeddable = (fsType != 2) && (fsType&0x200) == 0
|
||||
t.Skip(4 * 2) // xAvgCharWidth, usWeightClass, usWidthClass
|
||||
t.Skip(11*2 + 10 + 4*4 + 4)
|
||||
fsSelection := t.ReadUShort()
|
||||
t.rec.Bold = (fsSelection & 32) != 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user