Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
62489c0
Fix SetFontFace method to be inline with LoadFontFace
harture Jun 11, 2019
d0fbda1
[CLOUDTRUST-5523] Create a Jenkins job for this repository (#2)
Xelowak Oct 23, 2024
b802190
[CLOUDTRUST-5527] Enable Renovate (#3)
Xelowak Dec 2, 2024
6706a79
Update module golang.org/x/image to v0.23.0
support-triustid-ch Dec 5, 2024
72ea4f1
Merge pull request #5 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Dec 6, 2024
9d58642
Update module golang.org/x/image to v0.24.0
support-triustid-ch Feb 5, 2025
3577b98
Merge pull request #6 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Feb 5, 2025
6cacfd0
Update module golang.org/x/image to v0.29.0
support-triustid-ch Jul 10, 2025
acb123f
Merge pull request #9 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Jul 16, 2025
9b3e45f
Update dependency go to v1.24.5
support-triustid-ch Jul 17, 2025
55f7793
Merge pull request #10 from cloudtrust/renovate/go-1.x
basbeu Jul 17, 2025
f82f484
Update dependency go to v1.24.6
support-triustid-ch Aug 7, 2025
7562094
Update module golang.org/x/image to v0.30.0
support-triustid-ch Aug 8, 2025
ca366d9
Merge pull request #12 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Aug 8, 2025
87468c4
Merge pull request #11 from cloudtrust/renovate/go-1.x
basbeu Aug 8, 2025
f72134f
Update module golang.org/x/image to v0.31.0
support-triustid-ch Sep 9, 2025
6f68d4d
Merge pull request #14 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Sep 17, 2025
737abd3
Update module golang.org/x/image to v0.32.0
support-triustid-ch Oct 10, 2025
da96dc2
Merge pull request #15 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Oct 10, 2025
50860d0
Update dependency go to v1.25.4
support-triustid-ch Nov 6, 2025
0fbc6f7
Update module golang.org/x/image to v0.33.0
support-triustid-ch Nov 12, 2025
7918592
Merge pull request #16 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Nov 12, 2025
5b0bee3
Merge pull request #13 from cloudtrust/renovate/go-1.x
basbeu Nov 12, 2025
ee2c93c
Update dependency go to v1.25.5
support-triustid-ch Dec 3, 2025
2236e7e
Merge pull request #17 from cloudtrust/renovate/go-1.x
basbeu Dec 3, 2025
77c89a9
Update module golang.org/x/image to v0.34.0
support-triustid-ch Dec 9, 2025
0957b55
Merge pull request #18 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Dec 9, 2025
105c70f
Update module golang.org/x/image to v0.35.0
support-triustid-ch Jan 13, 2026
936640d
Merge pull request #19 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Jan 14, 2026
32870f5
Update dependency go to v1.25.6
support-triustid-ch Jan 16, 2026
4025bb3
Merge pull request #20 from cloudtrust/renovate/go-1.x
basbeu Jan 19, 2026
bebc67b
Update dependency go to v1.25.7
support-triustid-ch Feb 5, 2026
8d8fc6a
Merge pull request #21 from cloudtrust/renovate/go-1.x
basbeu Feb 9, 2026
63d027d
Update module golang.org/x/image to v0.36.0
support-triustid-ch Feb 10, 2026
9fb9c6b
Merge pull request #22 from cloudtrust/renovate/golang.org-x-image-0.x
basbeu Feb 10, 2026
d55aa07
Update dependency go to v1.26.0
support-triustid-ch Feb 11, 2026
7c1f861
Merge pull request #23 from cloudtrust/renovate/go-1.x
basbeu Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.png

vendor/*
!vendor/modules.txt
1 change: 1 addition & 0 deletions build.pipeline
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
goLibBuildPipeline('gg', true, 'ssh://git@github.com/cloudtrust/gg')
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ func (dc *Context) DrawImageAnchored(im image.Image, x, y int, ax, ay float64) {

func (dc *Context) SetFontFace(fontFace font.Face) {
dc.fontFace = fontFace
dc.fontHeight = float64(fontFace.Metrics().Height) / 64
dc.fontHeight = (float64(fontFace.Metrics().Height) / 64) * 72 / 96
}

func (dc *Context) LoadFontFace(path string, points float64) error {
Expand Down
2 changes: 1 addition & 1 deletion context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

var save bool

func init() {
func main() {
flag.BoolVar(&save, "save", false, "save PNG output for each test case")
flag.Parse()
}
Expand Down
Binary file removed examples/baboon.png
Binary file not shown.
Binary file removed examples/gopher.png
Binary file not shown.
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/cloudtrust/gg

go 1.24.0

toolchain go1.26.0

require (
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
golang.org/x/image v0.36.0
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
golang.org/x/image v0.36.0 h1:Iknbfm1afbgtwPTmHnS2gTM/6PPZfH+z2EFuOkSbqwc=
golang.org/x/image v0.36.0/go.mod h1:YsWD2TyyGKiIX1kZlu9QfKIsQ4nAAK9bdgdrIsE7xy4=
3 changes: 3 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["local>CLOUDTRUST/configuration-renovate-github:back"]
}
11 changes: 11 additions & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
## explicit
github.com/golang/freetype/raster
github.com/golang/freetype/truetype
# golang.org/x/image v0.36.0
## explicit; go 1.24.0
golang.org/x/image/draw
golang.org/x/image/font
golang.org/x/image/font/basicfont
golang.org/x/image/math/f64
golang.org/x/image/math/fixed