diff options
| author | Lenni <[email protected]> | 2021-03-06 21:08:19 +0100 |
|---|---|---|
| committer | Lenni <[email protected]> | 2021-03-06 21:08:19 +0100 |
| commit | e58a1961dd3bf91541c911216a626f6be10e9dd1 (patch) | |
| tree | 0ef6a069db908a009c80f7abeeec11d6bc3822d1 | |
| parent | 64165cad09ef73cb6acb3852d7650418c36bbfea (diff) | |
close font after usage
| -rw-r--r-- | examples/shapes/main.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/shapes/main.go b/examples/shapes/main.go index cfd873c..7a74da2 100644 --- a/examples/shapes/main.go +++ b/examples/shapes/main.go @@ -109,9 +109,12 @@ func main() { mask = uint32(xproto.GcForeground | xproto.GcBackground | xproto.GcFont) values = []uint32{screen.BlackPixel, screen.WhitePixel, uint32(font)} xproto.CreateGC(X, textCtx, draw, mask, values) - text := convertStringToChar2b("Hellö World!") + text := convertStringToChar2b("Hellö World!") // Unicode capable! - // In the end, writing text is way more comfortable using Xft - it supports TrueType, + // Close the font handle: + xproto.CloseFont(X, font) + + // After all, writing text is way more comfortable using Xft - it supports TrueType, // and overall better configuration. points := []xproto.Point{ |
