Newsletter, September 2022
Font fallback is coming

Elias is settling into a new place in Central America, and is starting to turn a critical eye towards Gio’s layout system. He’s exploring ways to make Gio layout more flexible, to solve long-standing issues like aligning modal content, and to reduce the boilerplate of writing Gio code. There’s no concrete proposal to share yet, but I look forward to hearing what comes of this exploration.

I (Chris Waldon) have started the implementation of Gio’s font fallback support. For more on how this is possible without finishing the fundraising campaign, see below. I’ve already finished the necessary changes to the text shaping and line wrapping infrastructure that Gio relies upon, and now need to modify widget.Label and widget.Editor to work with the new changes. Here’s a sneak peek at which is possible once font fallback is fully supported:

For the curious, the changes to the text shaping and line wrapping are in this go-text PR.

Sponsorship

I’d like to thank Tailscale for choosing to support Gio this month on OpenCollective! 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.

Font fallback

During September, we announced a funding initiative to implement font fallback and began accepting donations for it. Unexpectedly, Plato Team chose to request this feature and are supporting the work, so the funding campagin is no longer needed. The money donated to it will be saved to fund future enhancements to Gio. If you donated to that project and would like your money refunded instead, reach out to me.

core gio

Changes by author

Inkeliz:

  • app,io/system: [API] add StageInactive when window is not in focus. Now, Gio will send one system.StageEvent with system.StageInactive when the window is not active. It is implemented on macOS and Windows. 90688fdd
  • app: remove gofont.Collection by default. This change removes gofont.Collection(), which imports multiples fonts and increase the binary size. b1dba5f2
  • app,internal/gl: [wasm] fix context lost. Before that change, Gio could crash when the WebGL context was lost unexpectedly. Now, Gio will properly handle such situation and recreate the buffers/resources when context is restored and will wait until context is recovered. 83cb3835

Elias Naur:

  • op: tolerate incomplete macros. Before this change, a macro not Stop’ed would result in an endless loop during op decoding. 80196f3c
  • widget: make the InputOp key.Set empty for unfocused Editors. Fixes: #448 24eb1a4f

Dominik Honnef:

  • io/router: fix pointer positions of Enter and Leave events for nested areas. Before this change, inverse transformations of pointer positions would stack up, leading to incorrect positions when an enter or leave event was delivered to multiple areas. e37deed8

Chris Waldon:

  • app,gpu/headless: [linux] make EGL the default backend. This commit switches the priority of EGL and Vulkan so that EGL is always tried first. This is because our EGL backend performs significantly better than the Vulkan one, and we want the most performant experience to be the default. dbf64290

gio-x

Changes by author

Dominik Honnef:

  • richtext: reimplement on top of styledtext. 8fad062
  • styledtext: split richtext’s layout code into new package. The richtext package currently has two duties: laying out spans with different styles, and providing an abstraction for pointer input handling. The input handling is fairly opinionated and users may be interested in implementing their own, while still reusing the existing layout logic. 966239d
  • richtext: add comment and improve variable name. c62c60f

Chris Waldon:

  • component: drop erroneous extra table height. This commit drops extra height that was added to account for table headers from the component.TableStyle layout. This additional height was no longer needed after the outlay.Grid learned how to compute proper dimensions with locked rows. ce11c01