Frequently asked questions
So which canvas libs does vwRtx work with?
Developers use libraries (aka libs) for the HTML5 canvas to increase productivity and creative power. It is possible to work without a library - in which case you would have developed a large body of code assuming your app is something reasonably complex. And all libs are different just like React is different to Vue.
The initial version is focused on the Konva canvas lib - see https://konvajs.org/. In the Konva implementation, the vwRtx control is produced in a Konva custom-shape and as such is a full citizen of the Konva model allowing use with the Konva Transformer, scaling, rotation, z-index etc.
The rtx control is delivered as a JavaScript file and uses the ES6 module approach for importing to your project.
For those favouring other libs, it will be useful to know that internally the code is as library agnostic as practical. The design intention is to build out stubs to make it usable with more libs over time.
Get in touch with [email protected] and share your thoughts on coding it up for other libs. Tell us what your favourite lib is and we'll add it to the backlog. If your requirements are more urgent then lets talk.
Does it load fonts?
No - it requires fonts to be present at the browser before they are used. There's nothing special in this requirement - fonts are like images in that they are separate to the web page and require a separate process to get them to the browser.
There are plenty of examples and utilities for loading fonts - in our web fonts demos we use webfontloader. As you develop your solution it is fine to use a local font file, but be sure to use the web-based versions as part of your final testing to ensure that there are no latency issues that didn't show up when all the resources were local.
TIP
If a font file has not arrived at the browser and it's name is used in a vwRtx instance then the result will be gappy, disorganised text. In which case check your spelling of the font name and the state of the font loading process.
What dependencies?
To be the most versatile and unopinionated, vwRtx is developed with plain TypeScript - no other libraries are used. The one external work for the browser version is Graphemer: https://github.com/flmnt/graphemer - this is bundled meaning there is no requirement to download it separately.
For node, since there is no inherent browser or canvas support, there are more dependencies. We use node for automated testing so it is very possible. But the docs don't cover it yet. Contact us for more information if you plan to use node.
Does it handle RTL?
Not in this release. RTL is very complicated because of the need to switch between directions for numbers, LTR words, etc. The vwRtx could be made to handle output of RTL glyphs, but at present it has no capability to understand direction switching.
If / when rtx supports RTL it will follow the W3C Unicode Bidirectional Algorithm.
Does it handle multi-char characters like ❤️ and café?
Yes. For those not familiar with this point, JavaScript enables us to work with text strings as individual characters. Which is handy because in a rich text editor we need to measure and position every character. However, some characters, like the red-heart emoji or the accented e in café, are in fact composed of multiple characters. The vwRtx can handle insertion and cut & paste of emojis and complex characters.
Does it have a built-in toolbar?
Rich text editors can sometimes come with a built-in toolbar. vwRtx does not. The demo includes a primitive toolbar but you are not expected to use it in any serious projects. In your code, you will communicate with rtx via its API and a few methods. How you design your UI is up to you - we don't impose our toolbar on your app.
Why do you charge for a license
This is commercial software. We've spent a lot of time and effort to make it of marketable quality. What that means to you is that you get the quality of our work immediately without having to do your own research, achieve our years of experience, and live with your own bugs. Buying a license gets you productive today, with zero development delay, with the support and backup of a keen vendor. Plus you get updates for 12 months absolutely free. Apart from that, everyone needs to make a living and its just not feasible to deliver this scale and level of quality as a side-project.
Does the license process 'phone home'?
Not in this release. The only reason the license mechanism will stop your vwRtx instances from running is when it times out. Before that it'll be showing warnings in the console for 30 days. Demo copies are licensed for 3 months, and licensed copies for a year.