Newsletter, June 2023
Tagged Releases and System Font Progress

The past month saw a steady flow of bugfixes and optimizations going into core, but the biggest change is Gio’s first-ever tagged release! Gio v0.1.0 (and similar tags in gio-x and gio-example) are now available.

These new tags are provided in order to make it easier for community members to refer to specific versions of Gio’s API and to help set expectations about the ease or difficulty of upgrading between versions. Gio is no more stable than it was before we started tagging releases, but you should now be able to tell from the version number whether a given upgrade should be expected to contain breaking changes to APIs or behavior.

I intend to cut a new release monthly alongside the newsletter, which will allow the newsletter to serve as a changelog across all of our projects.

In other news, Plato Team has been supporting work to enable loading system fonts into Gio applications. I’ve been able to successfully prototype this atop this upstream go-text PR and you can scroll through the conversation there for screenshots of gioui.org/example/kitchen running with system fonts on many OSes.

I hope to send patches for system font loading in Gio soon.

Sponsorship

This month, Gio thanks the following organizations and community members for their ongoing support!

Supporting the whole team:

Supporting a maintainer:

Sponsorship money given to Gio enables Elias and I to cover the costs of running Gio’s infrastructure, to pay for some of our time spent maintaining and improving Gio, and to plan for funding significant feature work. You can support Gio by contributing on OpenCollective or GitHub Sponsors.

Changes by repo

Below you can find summaries and details of all changes across the official project repositories.

gioui.org@v0.1.0

Core saw the removal of an obsolete and useless clipboard operation, optimizations and bugfixes from Egon, Lothar, Dominik, and myself, and the ability to determine whether a widget.Label was truncated using the new LayoutDetailed method.

Breaking Changes by Author

Chris Waldon:

  • app: [API] drop ReadClipboard method. Now that all events are not emitted at the top level, there is no longer a way to receive the clipboard event generated by this window-global clipboard read method. As such, this commit drops the useless and confusing method from the exported API. 3bb6cca1

Non-Breaking Changes by Author

Egon Elbre:

  • app/internal/xkb: ensure things don’t panic. If there’s no keyboard attached we don’t want to panic when querying modifiers. 49bb7670
  • internal/stroke: tiny optimization to approxCubeTo. 0edc00a7
  • internal/stroke: add BenchmarkSplitCubic. 55404aec
  • internal/stroke: optimize SplitCubic. e5fe3a07

Chris Waldon:

  • widget: add method to acquire label shaping metadata. There are many times when an application wants to know metadata about shaped text without allocating a stateful text widget such as widget.Selectable. This commit introduces widget.TextInfo and adds an extra LayoutDetailed method to widget.Label returning this struct. Currently the struct only provides the information necessary to determine whether the text was truncated (useful for deciding whether a tooltip makes sense), but it can be expanded to include text metrics in the future for applications which require those. 90e57c2b
  • widget/material: use offsetlast in scroll position calculations. This commit updates the logic that computes scroll viewport coordinates to correctly consume layout.Position.OffsetLast, which was previously ignored. The impact of ignoring that field was that dragging on a scroll indicator could sometimes fail to reach the end of the list. cc2d2c0a
  • doc: update readme with tag policy. 6d925a12

Lothar May:

  • app: [macOS] consider screen scale when performing system.ActionCenter. Fixes: #505 2327604f

Dominik Honnef:

  • internal/stroke, gpu: reuse slice when splitting cubics. When building GPU vertices from paths, we call stroke.SplitCubic once per OpCubic. Before this change, each call to stroke.SplitCubic would allocate a slice, which we would only use to iterate over. b1837740

gioui.org/x@v0.1.0

X gained support for ongoing notifications on Android (ones that the user can’t dismiss).

Non-Breaking Changes by Author

Chris Waldon:

  • styledtext: use better truncator constant. 9d5605a
  • notify: restructure ongoing notification API. This commit makes sending an ongoing operation into a method in its own right, rather than a mode set on the entire notifier. This reflects the fact that expected usage will send few ongoing notifications but potentially many normal ones. dfb0a74
  • go.*,docs: update to gio v0.1.0 and update README. This commit updates x to use Gio v0.1.0 and adds the tag policy to the README. 1004d16

Hashim:

  • notify: add support for ongoing notifications. 6725b45

gioui.org/example@v0.1.0

The examples repo was mostly just updated to stay in sync with changes in other projects, but the notify example did gain support for sending ongoing notifications on Android.

Non-Breaking Changes by Author

Chris Waldon:

  • go.*: update to latest gio and gio-x. bfc09af
  • component/pages/menu: improve menu page responsiveness. This commit restructures the menu page to ensure that the content areas resize more gracefully. 21c958e
  • go.*,notify: update gio-x and demonstrate ongoing notifications. 26ff103
  • go.*,docs: update to gio{,-x}@v0.1.0 and document tag policy. 550f56a

End

Thanks for reading!

Chris Waldon