canvas
canvas copied to clipboard
★ Roadmap
This is a roadmap of future plans with canvas, the intention is to finish all these matters, but not necessarily in a timely matter. Please see this list as possible plans. Features will be implemented in the develop branch and merged when deemed mature. Also see https://github.com/tdewolff/canvas/wiki/Planning.
- [x] Parse SFNT (TTF and OTF) fonts with tables cmap, head, hhea, hmtx, maxp, name, OS/2, post, glyf, loca, kern, vhea, vmtx, CFF
- [x] Generate subset font by defining the glyph IDs that are used (reduces font file size greatly for embedding)
- [x] Text shaping using HarfBuzz (https://harfbuzz.github.io/ch01s03.html) to properly display Arabic, Devanagari, etc.
- [x] Text directionality using FriBidi (https://github.com/fribidi/fribidi) in order to mix e.g. Arabic and English in one sentence
- [x] Vertical text such as Chinese and Japanese
- [x] Text justification algorithm from Donald Knuth (http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf) as used in TeX
- [x] Text itemization using a rich text implementation to allow different font faces and decoration to occur in one paragraph
- [x] Support adding paths and images to rich text implementation for e.g. emoticons
- [x] Support PDF text copying
- [x] Support fill patterns (from paths?) and gradients (linear, radial)
- [x] Support path intersection to allow path merging (AND, OR, XOR)
- [x] Set Z-index for draw order for
Canvas - [x]
SetViewshould also change coordinate position - [x] Path transformation (
SetView) should transform stroke as well (works only for raster, PDF, SVG) - [x] Dashed stroke at start/corners is not always equivalent between renderers
- [x] EPS stroking support
- [x] PostScript target
- [x] Optimize stroke first point
- [x] Support native LaTeX formulas using https://github.com/go-latex/latex, see https://github.com/tdewolff/canvas/issues/48#issuecomment-695210608
- [x] Improve examples
- [x] Improve readme
- [x] Use https://github.com/benoitkugler/textlayout/tree/main/harfbuzz as a default
- [x] Use gamma corrected blending (incl. for fonts), see https://www.puredevsoftware.com/blog/2019/01/22/sub-pixel-gamma-correct-font-rendering/, http://nothings.org/gamedev/rasterize/, https://github.com/chmike/gofontrender
- [x] Add text attribute spans to RichText in order to properly track underlining for text ending in spaces (?)
- [x] Support Chinese text H/V alignment and position/line-height (text-orientation)
- [x] Self intersecting paths for boolean operations
- [ ] Increase test coverage
- [ ] Add CI and GitHub actions integration, see #88
- [ ] Support path tessellation
- [ ] Support OpenGL rendering using Blinn and Loop algorithm or something similar (see https://lambdacube3d.wordpress.com/2014/11/12/playing-around-with-font-rendering/ as well), also see this rust library: https://raphlinus.github.io/rust/graphics/gpu/2020/06/13/fast-2d-rendering.html
- [ ] Make PDFs linearized (see Annex F) if possible
- [ ] Add support for PDF external/internal links, see #114
- [ ] Support target formats: PGF, JPEG2000, WEBP, CCITT, CDR (CorelDRAW), DWG (AutoCAD Drawing)
- [x] Font features and variants to enable swash or stylistic ligatures, and to change the font weight variably
- [ ] Add Liang's hyphenation algorithm
- [ ] Use ligatures to improve line breaking, see e.g. Arabic justification rules https://www.tug.org/tugboat/tb27-2/tb87benatia.pdf
- [ ] Support vertical hinting/instructing of fonts
- [ ] Text on a path support
- [ ] Support Porter-Duffman
Srcblending mode for all renderers, see #193 - [ ] Support ColorSpace and LCD-subpixel rasterization natively in rasterizer
- [x] Add path approximator, based on a max error will linearize and simplify parts (implemented with
Path.SimplifyVisvalingamWhyatt) - [x] Add path patterns and wall tiling support
- [ ] Optimize memory layout: combine path commands in one float64 and include command count