Bump golang.org/x/image from 0.13.0 to 0.14.0

Bumps [golang.org/x/image](https://github.com/golang/image) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/image/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-11-22 09:04:50 +00:00
committed by Ralf Haferkamp
parent 3df256d665
commit e3283f5c88
4 changed files with 11 additions and 9 deletions

2
go.mod
View File

@@ -96,7 +96,7 @@ require (
go.opentelemetry.io/otel/trace v1.19.0
golang.org/x/crypto v0.14.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/image v0.13.0
golang.org/x/image v0.14.0
golang.org/x/net v0.17.0
golang.org/x/oauth2 v0.13.0
golang.org/x/sync v0.5.0

4
go.sum
View File

@@ -2179,8 +2179,8 @@ golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeap
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg=
golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk=
golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=
golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

View File

@@ -745,7 +745,7 @@ func (f *Font) initialize(offset int, isDfont bool) error {
f.cached.xHeight = xHeight
if !hasXHeightCapHeight {
xh, ch, err := f.initOS2Version1()
xh, ch, err := f.initOS2VersionBelow2()
if err != nil {
return err
}
@@ -1201,7 +1201,7 @@ func (f *Font) glyphTopOS2(b *Buffer, ppem fixed.Int26_6, r rune) (int32, error)
return int32(min), nil
}
func (f *Font) initOS2Version1() (xHeight, capHeight int32, err error) {
func (f *Font) initOS2VersionBelow2() (xHeight, capHeight int32, err error) {
ppem := fixed.Int26_6(f.UnitsPerEm())
var b Buffer
@@ -1235,12 +1235,14 @@ func (f *Font) parseOS2(buf []byte) (buf1 []byte, hasXHeightCapHeight bool, xHei
if err != nil {
return nil, false, 0, 0, err
}
if vers <= 1 {
const headerSize = 86
if vers < 2 {
// "The original TrueType specification had this table at 68 bytes long."
// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6OS2.html
const headerSize = 68
if f.os2.length < headerSize {
return nil, false, 0, 0, errInvalidOS2Table
}
// Will resolve xHeight and capHeight later, see initOS2Version1.
// Will resolve xHeight and capHeight later, see initOS2VersionBelow2.
return buf, false, 0, 0, nil
}
const headerSize = 96

2
vendor/modules.txt vendored
View File

@@ -1992,7 +1992,7 @@ golang.org/x/crypto/ssh/knownhosts
golang.org/x/exp/constraints
golang.org/x/exp/maps
golang.org/x/exp/slices
# golang.org/x/image v0.13.0
# golang.org/x/image v0.14.0
## explicit; go 1.18
golang.org/x/image/bmp
golang.org/x/image/ccitt