~whereswaldon

North Carolina

https://waldon.blog

Interested in Linux, decentralization, cryptography, golang/rust/c, and communication.

I spend most of my free time on:

  • Arbor, a tree-based, decentralizable chat platform
  • Gio, an immediate-mode UI framework for Go
  • Gio-Extras, my collection of libraries to extend Gio

If you get value out of my work, please consider sponsoring me on Liberapay or GitHub.

~whereswaldon/public-inbox

Last active 6 days ago

~whereswaldon/arbor-ci

Last active 4 months ago

~whereswaldon/arbor-dev

Last active 4 months ago

~whereswaldon/arbor-announce

Last active 1 year, 3 months ago

~whereswaldon/arbor-infra

Last active 1 year, 9 months ago

~whereswaldon/pointstar-devel

Last active 2 years ago

~whereswaldon/pointstar-announce

Last active 2 years ago
View more

Recent activity

Re: [PATCH gio v5 1/1] font/{gofont,opentype},text,widget{,/material}: [API] add font fallback and bidi support 8 days ago

From Chris Waldon to ~eliasnaur/gio-patches

On Fri, Nov 18, 2022 at 9:51 PM Elias Naur <mail@eliasnaur.com> wrote:
>
> On Fri, 18 Nov 2022 at 17:48, Chris Waldon
> <christopher.waldon.dev@gmail.com> wrote:
>
> > +func (l *document) Lines(viewport image.Rectangle) text.Lines {
> > +       startIdx := 0
> > +       endIdx := len(l.lines)
> > +       for i, line := range l.lines {
> > +               if l.LineIsAbove(line, viewport.Min.Y) {
> > +                       startIdx = i + 1
> > +               }
> > +               if l.LineIsBelow(line, viewport.Max.Y) {
> > +                       endIdx = i

[PATCH gio v5 1/1] font/{gofont,opentype},text,widget{,/material}: [API] add font fallback and bidi support 9 days ago

From Chris Waldon to ~eliasnaur/gio-patches

This commit restructures the entire text shaping stack to enable lines of shaped text to
have non-homogeneous properties like which font face they belong to and which direction
a segment of text is going.

The text package now provides interface types describing text that widgets can use to
display strings without dealing with the intricacies of bidirectional text and RTL
layout.

Every text.Face now has a method, Shaper() which returns a concrete shaper implementation
capable of shaping that face. The text.Cache takes advantage of this to
construct a FontShaper for the first text.FontFace it is provided with, and then
loads all of the remaining faces into that shaper. The FontShaper is then responsible
for choosing appropriate faces for the requesed font, leaving text.Cache to focus
entirely on caching layout and shape results.
[message trimmed]

[PATCH gio v5 0/1] implement font fallback and bidirectional text 9 days ago

From Chris Waldon to ~eliasnaur/gio-patches

This is a revision of [0].

The major change is the new API for package text and resulting dramatic
simplifications to widget.Editor and widget.Label.

Cheers,
Chris

[0] https://lists.sr.ht/~eliasnaur/gio-patches/patches/36848

Chris Waldon (1):
  font/{gofont,opentype},text,widget{,/material}: [API] add font
    fallback and bidi support

Re: [PATCH gio v3 1/1] font/{gofont,opentype},text,widget{,/material}: [API] add font fallback and bidi support 12 days ago

From Chris Waldon to ~eliasnaur/gio-patches

On Sat, Nov 12, 2022 at 1:37 PM Elias Naur <mail@eliasnaur.com> wrote:
>
> Thank you!
>
> On Fri, 11 Nov 2022 at 10:50, ~whereswaldon <whereswaldon@git.sr.ht> wrote:
> >
> > Fixes: https://todo.sr.ht/~eliasnaur/gio/425
> > Fixes: https://todo.sr.ht/~eliasnaur/gio/211
> >
>
> Drop extra newline to please SourceHut.

Ack

Re: [PATCH gio] widget: fix gap buffer reading data from gap 14 days ago

From Chris Waldon to ~eliasnaur/gio-patches

On Mon, Nov 14, 2022 at 9:01 AM Chris Waldon
<christopher.waldon.dev@gmail.com> wrote:
>
> On Sat, Nov 12, 2022 at 12:29 PM Elias Naur <mail@eliasnaur.com> wrote:
> >
> > On Wed, 9 Nov 2022 at 14:38, Chris Waldon
> > <christopher.waldon.dev@gmail.com> wrote:
> > >
> > > On Wed, Nov 9, 2022 at 1:54 PM Elias Naur <mail@eliasnaur.com> wrote:
> > > >
> > > > On Wed, 9 Nov 2022 at 12:21, Chris Waldon
> > > > <christopher.waldon.dev@gmail.com> wrote:
> > > > >
> > > > > This commit fixes two different ways in which the gap buffer could be

[PATCH gio v3] widget: do not allow invalid utf8 in editor 14 days ago

From Chris Waldon to ~eliasnaur/gio-patches

This commit replaces invalid UTF8 codepoints with the replacement character
when they are inserted into the editor. This ensures that the editor never
moves the editing gap to an invalid location and reads its contents.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 widget/buffer.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/widget/buffer.go b/widget/buffer.go
index 40e02a86..48ed72ed 100644
--- a/widget/buffer.go
+++ b/widget/buffer.go
@@ -6,6 +6,8 @@ import (
[message trimmed]

Re: [PATCH gio] widget: fix gap buffer reading data from gap 14 days ago

From Chris Waldon to ~eliasnaur/gio-patches

On Sat, Nov 12, 2022 at 12:29 PM Elias Naur <mail@eliasnaur.com> wrote:
>
> On Wed, 9 Nov 2022 at 14:38, Chris Waldon
> <christopher.waldon.dev@gmail.com> wrote:
> >
> > On Wed, Nov 9, 2022 at 1:54 PM Elias Naur <mail@eliasnaur.com> wrote:
> > >
> > > On Wed, 9 Nov 2022 at 12:21, Chris Waldon
> > > <christopher.waldon.dev@gmail.com> wrote:
> > > >
> > > > This commit fixes two different ways in which the gap buffer could be
> > > > tricked by invalid utf8 input into reading bytes from within the gap.
> > > >
> > > > Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

Re: [PATCH gio 4/4] font/{gofont,opentype},text,widget{,/material}: [API] add font fallback and bidi support 18 days ago

From Chris Waldon to ~eliasnaur/gio-patches

On Wed, Nov 9, 2022 at 1:46 PM Chris Waldon
<christopher.waldon.dev@gmail.com> wrote:
>
> > Great work! Comments below
>
> Thanks for the review! Replies below.
>
> Chris
>
> > Needs a Fixes/References header?
>
> Huh. We don't really have a ticket for either of these features. The
> closest I can find are:
>

Gio News, October 2022 18 days ago

From Chris Waldon to ~eliasnaur/gio

Hey all,

You can now find our latest newsletter on the website here:

https://gioui.org/news/2022-10

Thanks!
Chris

[PATCH gio v2] widget: fix gap buffer reading data from gap 18 days ago

From Chris Waldon to ~eliasnaur/gio-patches

This commit fixes two different ways in which the gap buffer could be
tricked by invalid utf8 input into reading bytes from within the gap.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 widget/buffer.go      |  37 ++++++-
 widget/buffer_test.go | 247 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 283 insertions(+), 1 deletion(-)
 create mode 100644 widget/buffer_test.go

diff --git a/widget/buffer.go b/widget/buffer.go
index 40e02a86..f9d40577 100644
--- a/widget/buffer.go
+++ b/widget/buffer.go
[message trimmed]