Open rjkroege opened 6 years ago
I will note in passing based that this enhancement will require extensive changes probably extending into devdraw
if we wish to support varying line heights.
Are varying line heights the only change required in devdraw? I wouldn't initially expect that bold/italic/colouring would affect the heights, but perhaps I'm missing something.
I'd like to support fonts of differing sizes.
The reason I ask is that I'm curious whether edwood would work or continue to work in plan 9 with a change to the draw interface. Perhaps that is not a design goal for this project, but I thought I would ask.
Support for Plan 9 and other OSes should be a goal. I've opened #115 (Plan 9 support) and #116 (Windows support).
I note the following.
devdraw
protocol if only because I like incremental progress. That would let this work on Plan9.devdraw
protocol is not very performant drawing many small rects whether they're glyphs or simply blits.devdraw
implementation that would offer a protocol extension to greatly speed up drawing styled text and the draw
package would use it when available.devdraw
run also on windows etc.Hm. Then again, maybe duitdraw
or something like that is a better approach.
Thank you for the clarification. I would like to give this a try on Plan 9/9front at some point. I'm personally ok with using 9front and even proposing or working on extensions to draw there. I think that it would be interesting to be able to auto-probe whether the draw(3) files support the extensions or not before using the new commands. Maybe even 3D graphics commands could work this way some day in the future.
In terms of styled text and godoc styling I don't know if I would need variable heights. I personally would be quite happy to have a little colour, some bold/underline similar to man pages in Linux/Mac. Kind of in between the pure text godoc and the HTML godoc. Full and rich styling is something that PDF viewers and web browsers excel along with all of the baggage that comes with that.
Summary of idea: Edwood should permit an external program to set styles (bold, italics, etc.) on ranges of text. Use cases would include
win
External program would connect to the Edwood (aka Acme) filesystem and write style data to one of the special files. i.e.:
would get two new entries:
or something like that. And styling could be written to the
bodystyle
ortagstyle
files.