This package has been deprecated since Go 1.6, which is long ago.
There's a warning printed whenever this package is imported, which
helped people migrate away from it by now. Delete it since it's
unused and unsupported.
Change-Id: If84b631ebff6530cdb955af34fa7b84d50130166
Reviewed-on: https://go-review.googlesource.com/c/148570
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The Scalable Vector Graphics (SVG) 1.1 specification URL has changed.
The old URL, https://www.w3.org/TR/SVG/, now hosts the SVG 2 spec.
SVG 1.1 spec has moved to https://www.w3.org/TR/SVG11/.
This change makes this package go generate successfully with no diff.
Change-Id: Ifa788b1bb47748610b3adc0ac96692c00bcb3158
Reviewed-on: https://go-review.googlesource.com/c/148566
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Currently, the library produces a parsing error when the font
contains a PostScript table of version 1.0.
CL adds this version to the validation code and implements a glyph
name lookup for it.
Change-Id: Id4999d8b252e5c2d8e897f637ba31270336cfe9a
Reviewed-on: https://go-review.googlesource.com/c/146080
Reviewed-by: Nigel Tao <nigeltao@golang.org>
The library assumes the hmtx size to be equal to 2*nGlyph + 2*nHm,
which is a simplification of 4*nHm + 2*(nGlyph-nHm) as described
in the spec. However, fonts seen in the wild sometimes omit the
second term (left side bearings), making validation to fail.
CL fixes the validation code by allowing to omit the second term.
Fixesgolang/go#28379
Change-Id: I2293e498e72f95e5fe08c2b375ea7b020d06cde3
Reviewed-on: https://go-review.googlesource.com/c/144080
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Library assumes that OS/2 header size is at least 96 bytes,
which is not the case for fonts with OS/2 table version <= 1.
This CL adds a version test and handles the legacy header.
Fixesgolang/go#28339
Change-Id: I79bd8f8bbf262c1caaf4e66888446159b5e4fb43
Reviewed-on: https://go-review.googlesource.com/c/144079
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Elias Naur <elias.naur@gmail.com>
Decode BITMAPV4INFOHEADER and BITMAPV5INFOHEADER in addition to
BITMAPINFOHEADER and check if any of their features are used. If this is
not the case, the bmp can be decoded as if it had the BITMAPINFOHEADER.
Otherwise an ErrUnsupported is returned.
The colormap.bmp and yellow_rose-small-v5.bmp files were generated using
imagemagick using the following conversions:
convert video-001.bmp -depth 8 -palette colormap.bmp
convert yellow_rose-small.bmp -format BMP5 yellow_rose-small-v5.bmp
The corresponding png files were created using imagemagick convert
without any arguments.
Fixesgolang/go#27767
Change-Id: I5c0138b231c68132d39a29c71b61faa546921511
Reviewed-on: https://go-review.googlesource.com/c/141799
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This also fixes the writer test to actually compare the decoded images,
so as to make sure it is decoded properly.
Implements golang/go#25945.
Change-Id: I606887baa11b7664018313cf7d5800b2dc7622cf
Reviewed-on: https://go-review.googlesource.com/120095
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Currently the instructions tell the user to:
go get -u golang.org/x/image
However, this is not valid because golang.org/x/image contains no Go
files.
Instead it should read:
go get -u golang.org/x/image/...
Fixesgolang/go#25618.
Change-Id: I465fac26afdca52878518e4c01d46cf9d12930b9
Reviewed-on: https://go-review.googlesource.com/115675
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The proposed fix updates the x axis offset variable in case the tile
surpasses the limits of the destination image.
Fixesgolang/go#24657
Change-Id: I6bc52274a05dc41b058f6a6f1d0a304f1b20152d
Reviewed-on: https://go-review.googlesource.com/104295
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
When DstMask is not nil, this shortcut causes stack overflow because
Copy function in turn will call Scale with same dr and sr.
Fixesgolang/go#23107
Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e
Reviewed-on: https://go-review.googlesource.com/83537
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This CL adds the type Face that implements the font.Face interface.
This CL also adds tests using gofont/goregular as an input font, using
github.com/golang/freetype/truetype as reference values.
Updates golang/go#22451.
Change-Id: I2a6945309331b251ec2ddec95b6e809ad10aa116
Reviewed-on: https://go-review.googlesource.com/73870
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Move the README to README.md so Gerrit can render it; currently
Gerrit only renders files named exactly "README.md" (for example at
https://go.googlesource.com/go).
Add more links to the README explaining how to file issues,
how to submit code changes, where to download the code to and
how to get it. Hopefully this should help people who go to
https://go.googlesource.com/image or https://github.com/golang/image
figure out how to get started with development.
Change-Id: I390d4bd84c9fd7d0bd3f3f56f63ea8482d03a725
Reviewed-on: https://go-review.googlesource.com/49830
Reviewed-by: Kevin Burke <kev@inburke.com>
The test code now produces bit-identical results across platforms.
Fixesgolang/go#21460.
Change-Id: I58b72dacf3c7930e2804b4e37bd3ccd9ef3dc2f0
Reviewed-on: https://go-review.googlesource.com/61024
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Specifically, this commit adds Benchmark.*1024.* functions, and then
gofmt's some other Benchmark functions.
There are existing floating point benchmarks in acc_test.go, but they
have narrower scope. The benchmarks in vector_test.go are closer to
end-to-end benchmarks for the package.
Change-Id: I5b4770bcefa9aa3ed4d4823f78993df7b80c7d87
Reviewed-on: https://go-review.googlesource.com/62130
Reviewed-by: David Symonds <dsymonds@golang.org>
Also add tests for the Noto proprietary fonts. Prior to this commit,
NotoColorEmoji.ttf was unsupported. It's still not well supported, but
the error message returned is now more informative.
Change-Id: I61a3301d7f2458a4b838eb1de7a73d6472e3486f
Reviewed-on: https://go-review.googlesource.com/43694
Reviewed-by: David Crawshaw <crawshaw@golang.org>
A future commit will actually use subtables past the first one, but for
now, ignore them instead of failing on their presence.
Also add tests for the DejaVu proprietary fonts. Prior to this commit,
DejaVuSans-ExtraLight.ttf was unsupported.
Change-Id: Ic78a59c5ab30e4091efa2a04b89b12cb786157db
Reviewed-on: https://go-review.googlesource.com/42192
Reviewed-by: David Crawshaw <crawshaw@golang.org>
As noted at the top of reader.go, this package is a fork of the standard
library's LZW package, due to an "off by one" in the TIFF format. Grep
for "NOTE" in the Go code for more details.
This commit picks up an upstream change:
https://go-review.googlesource.com/14410 "tidy up some flush calls"
Picking up the more recent change:
https://go-review.googlesource.com/42032 "fix hi code overflow"
will be a follow-up commit, separate from this straightforward commit,
since it has a non-trivial interaction with that off by one.
Change-Id: Iaf795d11590b3e3e0891e3ea3f04b696de4243c9
Reviewed-on: https://go-review.googlesource.com/42191
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
The underlying font format's Y axis increases up. The Go standard
graphics libraries' Y axis increases down. This change makes the Go API
consistent with the other Go libraries.
Also change Segment.Args from [6]fixed.Int26_6 to [3]fixed.Point26_6 to
emphasize that the Args are consistent with other fixed.Point26_6 use.
Change-Id: Idd7b89eb4d86890dea477ac2ef96ff8f6b1dee8d
Reviewed-on: https://go-review.googlesource.com/39072
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Bigelow & Holmes have prepared new versions of the Go Fonts. The version
numbers have changed from 2.004 to 2.008. ChangeLog:
* New! 2 new fonts, bringing the total to 12: Go Smallcaps and Go
Smallcaps Italic.
* New! U+FFFD REPLACEMENT CHARACTER glyph added.
* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE ring tweaked.
* U+00F0 LATIN SMALL LETTER ETH glyph lightened.
* Superfluous U+0005 <control> glyph removed.
* Split integral, chart draw, block, shade and related glyphs now span
the full height and have fewer seams when tiled.
* Raised most capital letter diacritics and some lowercase diacritics.
* Mono character widths fixed to be uniform.
* Underline position adjusted.
* SFNT glyph order and cmap table optimized.
* SFNT glyph names (post table) regularized, consistent with the AGLFN.
* ttfautohint upgraded to the latest version, from 1.5 to 1.6.
Change-Id: I0985f07d58b984010199dd723ccdf5892ee59c78
Reviewed-on: https://go-review.googlesource.com/38870
Reviewed-by: Rob Pike <r@golang.org>
Recent commits (probably 792d36e1 "support TrueType compound glyphs" and
1995ed1a "support TrueType glyph transformations") let us decode all the
glyphs in the Adobe TrueType fonts, but I forgot to update the test
coverage in those commits.
Change-Id: I7b135005cd67082f84aee16d296debdedcc9488e
Reviewed-on: https://go-review.googlesource.com/38281
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This will lessen the diff in a subsequent commit, which introduces a
call stack.
Change-Id: I478857675f47b53e6bd3ee270087a00b9d1d4d34
Reviewed-on: https://go-review.googlesource.com/38279
Reviewed-by: Nigel Tao <nigeltao@golang.org>
The format is relatively complicated but rarely seen. It doesn't seem
worth the effort. Ignoring it is what Microsoft Windows and FreeType do.
Change-Id: I4415bd591c832650066de1d4e035b20a7230a4da
Reviewed-on: https://go-review.googlesource.com/38273
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Also add tests for Apple proprietary fonts.
Change-Id: I5ce8efa2397bb01c5255d956a77c955ba1383105
Reviewed-on: https://go-review.googlesource.com/38272
Reviewed-by: David Crawshaw <crawshaw@golang.org>
go1.8.typealias is the build tag defined by the unreleased
"Go 1.8 + type aliases" variant in the Go repo's dev.typealias branch.
Change-Id: Iff2566249ecc9a6788b78199743d2005708f1cd7
Reviewed-on: https://go-review.googlesource.com/37511
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>