WordTsar 0.2.2073 Released

I’ve used and am using this version extensively on Windows and Linix. There has been minimal testing under MacOS.

In this Release:

  • Fixed Ticket 18 (MacOS)
  • Fixed Ticket 17 (MacOS)
  • Fixed Ticket 15 (MacOS)
  • Fixed Ticket 16
  • Added full justification of text .ojon

Known Issues:

  • ^KP not implemented, use ^OP
  • .pt command can only be used once per document
  • See Ticket System at Sourceforge

Goodbye wxWidgets, hello Qt!

I’ve been developing various pieces of software in wxWidgets (back when it was called wxWindows!) for a long time. But recently, I’ve made the switch to Qt.

WordTsar under wxWidgets was stable, and I used it to write quite a few novels (http://geraldbrandt.com), so why the switch? Well, it seems that I always had to do something just a little different based on what platform the software was running on. Don’t get me wrong, 99.9% of the code was cross platform and worked well, but there always seemed to be corner cases.

Qt version, Windows and Linux

The last straw for me was when I tried to get WordTsar running under MacOS. I tweaked here and there. Keyboard input was a pain, but then it was under Qt as well. It was just easier under Qt because I’d already fixed the issue under wxWidgets. So, what was it that I couldn’t get working?

wxTimers.

I use timers to update WordTsar’s status bar, do word counting, and flash the carat. None of it worked under MacOS. Again, I tweaked here and tweaked there, but I just couldn’t get timers to work. Really, timers are a pretty basic function. They should Just Work.

About two years back, I did a test port to Qt to help me find an elusive bug. I moved over just enough code to help track down the bug, and stopped. This time around, I didn’t.

QT Version – MacOS

WordTsar is now 100% Qt based, with all the functionality of version 0.1 Release 1977. Well, almost. The Linux version of WordTsar had spell check working, using Hunspell. Non of the other ports did. I’ve decided to leave spell check out since I want to do it in a more cross-platform way.

What differences will you see with the Qt port? Some of the dialogs look different. Yup, that’s pretty much it.

Well, except for one thing.

Speed.

The Qt version is SIGNIFICANTLY faster than the wxWidgets version. Why? Two things in particular:

  1. Measuring of text under Qt just flies. Under Linux, measuring the widths of 605,814 characters took roughly 1800 ms. With the code optimized to measure strings instead of characters, I got that down to 460 ms. Under Qt, which can only measure individual character widths* the speed is 138 ms. That is a massive speed improvement.
  2. QString vs wxString is the second big increase. I do a lot of parsing of strings using .Mid(), .BeforeFirst(), .Left(), etc. I do no in string indexing (i.e. string[x]). Parsing WordTsar dot commands (string heavy) on a 111,000 word novel took 1060 ms under wxWidgets. With Qt, that process took 348 ms. I was planning to optimize the dot command routines to speed things up, and I still will (via some form of caching), but I can postpone that work now.

What this all comes out to, is under wxWidgets, laying out a 111,000 word document took 1670 ms. Not bad, really. Under Qt, the same process takes 576 ms. That’s a very noticeable difference.

I’ll be testing the Qt version over the next week by editing a 92,000 word novel and bringing that up to 100,000 words or so. Not a bad stress test. If all works out, there will be a WordTsar 0.2 Release xxxx happening next week for Linux, Windows, and MacOS.

* wxWidgets has GetPartialTextExtents() which, when passed in a string, will return an array of character widths. Qt has no such function. You can get the width of an entire string, but not the characters in that string. So, with Qt, I must measure each character.

WordTsar 0.1.1977 Released

I’ve used and am using this version extensively on Windows and Linux.

OSX version is being worked on.

Windows and Linux versions only.

In this Release:

Fixed Ticket 11
Fixed ticket 12
Added RTF export for subscript, superscript, and strikethrough
Added RTF export of columns
Changed RTF right margin to use /ri and not /margr
Added RTF export headers and footers
Added RTF export save hyphenation
Added RTF export margin settings
Added RTF export of indexes
Added RTF export of kerning on or off
Added RTF export save top, bottom, and paragraph margins
Added RTF export save page offset ((for odd and even pages, we use .poo to set RTF gutter (RTF only allows one setting))
Added RTF export save tabs
Added RTF paragraph alignment
Corrected Wordstar .mb usage
Fixed Windows scrollwheel use
Corrected RTF export unicode character support
Sped up RTF saving
Removed use of fontcache
Fixed wrong display of pagebreak at top of window
Fixed layout speed, especially under Linux
Corrected Linux layout to better match Word and LibreOffice

Features

Nothing on the WordTsar side really.
Improved RTF export
Faster Layout

Bugs Fixed

Ticket 11 and 12

Known Issues

RTF support for many dot commands is not implemented (see implemented.xlsx)
^KP not implemented, use ^OP
.pt command can only be used once per document, all others are ignored. (wxWidgets doesn't let you change paper type on the fly)
OSX keyboard input does not work
See Ticket System

WordTsar 0.1.1571 Released

UPDATED TO 1572: 1571 had an intermittent hanging bug when moving the cursor up or down and dot commands not displayed. Sorry for the bad release.

This is the first release I’ve made that I have not tested extensively (through daily use). What is not tested is pretty much all functionality when not displaying dot commands. If something breaks, turn dot command display on and everything should work as expected again.

OSX version is being worked on.

Windows and Linux versions only.

In this Release:

  • Cleaned up the code a bit by getting rid of uneccesary debug
  • Added preferences dialog for screen color, etc
  • Center, left, right, and justify status indicators now work

Features

  • Count of lines per page in status bar
  • Vertical Line height in status bar
  • Color Selection Dialog for text (^P-) (any color chosen get brought down to Wordstar’s 16 color palette)
  • Preferences dialog (via F1)
  • Show and Hide Scroll Bar, Ruler, Top Status Line, Bottom Status Bar (via Preferences)
  • Show/Hide dot commands (via Preferences)
  • Show/Hide flag column (via Preferences)

Bugs Fixed

  • Got rid of debug log messages
  • fixed .LM 0 command

Known Issues

  • RTF support for many dot commands is not implemented (see implemented.xlsx)
  • ^KP not implemented, use ^OP
  • GTK print preview displays a black page. Printing still works fine. This is a wxWidgets issue.
  • .pt command can only be used once per document, all others are ignored. (wxWidgets doesn’t let you change paper type on the fly)
  • OSX keyboard input does not work
  • If WordTsar starts with Control Codes not showing, you will not see a cursor until you have some text entered.
  • ^OB setting not implemented, set them via F1 Preferences

Upcoming

I got tired of working on RTF, so threw in some of the dialogs (color and preferences), Now back to RTF.

I’d like to move RTF import and export into a first class citizen so it can be a native file format for WordTsar right beside Wordstar files.

In the background, I’m thinking of adding column support and how to add table support (Comments welcome. Wordstar never had the concept of tables, really).

WordTsar 0.1.1314 Released

Most of the work in this version was done to support different paper sizes.

In this Release:

  • Work on the caret to make it the same across platforms
  • added a page layout dialog ^OY
  • completed .po .poe .poo .mt .mb .hm .fm commands
  • added new command .pt to specify paper type (auto added by ^OY)
  • moved RTF code to make it easier to work on
  • sped up loading LibreOffice’s bloated RTF

Features

  • .pt command (a non Wordstar dot command) specifies paper type/size. You can use ^OY to specify the paper. Wordstar doesn’t really care about paper size, it uses whatever is in the printer and the .rm .pl, etc commands to print on that paper. Modern printers can have multiple paper bins, and auto select the bin based on paper size.
  • Is no longer hard coded to 8.5″ x 11″ paper size
  • .po .poe .poo .mt .mb .hm and .fm are all implemented
  • bad dot commands are highlighted in a different color as well as having the ‘?’ in the right margin

Bugs Fixed

  • more work on the carat.

Known Issues

  • RTF support for many dot commands is not implemented (see implemented.xlsx)
  • ^KP not implemented, use ^OP
  • GTK print preview displays a black page. Printing still works fine. This is a wxWidgets issue.
  • .pt command can only be used once per document, all others are ignored. (wxWidgets doesn’t let you change paper type on the fly)
  • OSX keyboard input does not work
  • See Ticket System

Upcoming

It’s time for a bit of code cleanup. Don’t expect any new command or key sequences in the next release. After the code cleanup, I’d like to move RTF import and export into a first class citizen so it can be a native file format for WordTsar right beside Wordstar files.

In the background, I’m thinking of adding column support and how to add table support (Comments welcome. Wordstar never had the concept of tables, really).

WordTsar 0.1.960 Released

A large portion of this development cycle was spent on printing issues. In fact, I got so fed up with it, I ported WordTsar from wxWidgets to QT. Doing so helped me find the issue with wxWidgets printing (it’s a weird workaround), so the QT port has stopped (it works quite well though). The port also showed me how embedded wxWidgets was into this project, even where maybe it shouldn’t be, so I see a code cleanup in the future.

In this Release:

Features

  • added .IG command based on user request
  • added spell checking (currently Linux only)

Bugs Fixed

  • printing should now look the same under Windows and Linux
  • creating a block ^KB – ^KK didn’t properly highlight the block
  • corrected caret so should now work under all OS’s (needs testing)

Known Issues

  • RTF import and export of headers and footers is incomplete
  • ^KP still not implemented, use ^OP
  • OSX keyboard input is incomplete
    See ticket system

For those interested, here is a screen shot of the QT version. It looks close to the same, but there are minor differences.

WordTsar 0.1.616 Released

Headers and Footers now implemented. Set them up, and ^OP to see the end result and print them

A minor bug fixed with printing and .rm, and ^KP is still not done (use ^OP)

I think what I’ll work on next is RTF export, to get it to support all the work done recently and make it easier to extend. Finally getting the Mac/OSX port back into a working state would be great as well.