-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: move x/exp/shiny/font to x/image/font #12410
Comments
SGTM |
SGTM On 31 August 2015 at 16:32, Nigel Tao notifications@github.com wrote:
|
This move has happened. (Well, a copy, not a move, for now. The x/exp/shiny/font edition is deprecated and I'll delete it after a grace period.) |
For those who arrive here later (like me), what is the recommended font package for new projects? |
github.com/golang/freetype will be deprecated at some point. It is limited to only truetype fonts. github.com/golang/freetype/truetype is still current, but it now implements an interface defined by golang.org/x/image/font. The latter is independent of any particular font format. Think of it like package image in the standard library, and the former package, g.c/g/f/t, as like package image/jpeg or golang.org/x/image/webp, except that it happens to be in a separate repo, mainly because it has a separate license. |
I've recently told people (https://groups.google.com/forum/#!topic/golang-nuts/tr-MftD7kbo) to update their code's imports from code.google.com/p/freetype-go to github.com/golang/freetype.
The old code.google.com version's text drawing code was tightly coupled to the freetype/truetype package. The github version is less coupled, and uses a newer font package under golang.org/x, one that supports a variety of font file formats. This "package font" currently lives at golang.org/x/exp/shiny/font, because I was working on shiny as well, and they're sort of related, in that many GUI programs want to render text. It isn't necessarily tied to shiny (an experimental GUI library), though, and long term, the font packages should live somewhere other than under golang.org/x/exp.
Given that people will be updating their import paths anyway, it might make sense to move "package font" out from exp now, so that people update their import paths just once instead of once now and a second time later.
Thus, I propose to move font, font/plan9font and its example program out from
golang.org/x/exp/shiny/font
to live instead at
golang.org/x/image/font
"package font"'s exported API isn't frozen yet, but this new location is still under golang.org/x, not the standard library, so the API freeze doesn't necessarily apply.
The text was updated successfully, but these errors were encountered: