FAQ

On Fri, Aug 28, 2015 at 4:53 PM, Nigel Tao wrote:
After that, most changes should be mechanical, such as:
- truetype.Font.Kerning becomes truetype.Font.Kern.
- truetype.NoHinting becomes font.HintingNone.
- Some values (like a font scale and an advance width) changes from
int32 to fixed.Int26_6, a common type for sub-pixel measurements. (The
golang.org/x font packages can't depend on
github.com/golang/freetype).
- Similarly, raster.Point becomes fixed.Point26_6.
I forgot to mention that some scales have changed:

- A fixed.Point26_6 is, as its name suggests, a 26.6 fixed point. The
old raster.Point was 24.8, not 26.6. The rationale for the change is
at https://github.com/golang/go/issues/11906

- The maximum alpha value for a raster.Painter has changed from
1<<32-1 to 1<<16-1, to be consistent with the image/color package in
the standard library.

These are relatively low level concepts, so if you're changing from
the code.google.com version to the github.com version, you probably
won't notice the difference (for example, changing freetype.Pt(10, 10)
to fixed.P(10, 10) will work fine). But there is a difference.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 17 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 28, '15 at 6:53a
activeSep 2, '15 at 12:24a
posts17
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase