pbsurf's comments

pbsurf | 4 years ago | on: Ask HN: Who wants to collaborate?

I'm working on computational chemistry, with the very long-term (decades) goal of designing molecules (proteins/enzymes) for things like artificial photosynthesis and molecular computing (chips still rely on the bulk properties of semiconductors; for miniaturization to continue, at some point it will become necessary to design molecules to function as logic and interconnect).

See https://github.com/pbsurf/chem

pbsurf | 5 years ago | on: Ask HN: How to do cross platform GUI?

For my cross-platform app, I was originally using Qt for desktop platforms and Android. I was fairly happy with Qt on the desktop, but less so on Android, in part because I was using Qt Widgets - Qt Quick is the newer, preferred way to build GUIs in Qt, at least for mobile. Around 2016 I started looking into an iOS port - at the time, Qt for iOS was fairly immature and there was (is?) some uncertainty about licensing requirements for statically linking Qt on iOS. Having already spent more time than I wanted fighting various problems with Qt on Android, I decided to consider alternatives and ended up creating my own SVG-based GUI library that I now use across desktop and mobile:

https://github.com/styluslabs/ugui

pbsurf | 5 years ago | on: PDF: Still unfit for human consumption, 20 years later

One way that SVG could be used for multipage documents is with a convention that the top-level <svg> tag is the document and child <svg> tags are the pages - this is what I do in my app. I also use the fact that gzip files can be created with independently decompressible blocks to create svgz files with page-level random read access [1].

But another barrier is that browsers refuse to support SVG fonts. One supposed reason for this, the lack of hinting support in SVG fonts, is less relevant now with high DPI displays - macOS no longer does hinting at all I believe. The additional effort to support SVG fonts is really minimal [2], so it seems strange that it's intentionally omitted.

[1] https://github.com/styluslabs/ulib/blob/master/miniz_gzip.h

[2] https://github.com/styluslabs/usvg

pbsurf | 5 years ago | on: Fast 2D Rendering on GPU

I've just released a fork of nanovg that does GPU rendering a bit like Pathfinder, so it can support arbitrary paths - nanovg's antialiasing has some issues with thin filled paths. It also adds support for dashed lines.

https://github.com/styluslabs/nanovgXC

If you give it a try, let me know how it works for you.

page 1