|
|
|
|
|
by eludwig
1108 days ago
|
|
Many older word processors (the only ones I'm familiar with) used style "runs", which are simply an array of structs that contain startPosition, endPosition (or length) and then a bunch of style info in whatever way makes sense to them. I worked on Ready,Set,Go! back in the day and also wrote my own styled editor for the Mac in the 90's. One interesting thing about this is that you could use a lazy "adjustor" to remove duplicate or overlapping styles. No need to worry about it during typing or selecting. A low priority task could analyze the runs and fix them up as needed and no one was the wiser. IMO, the hardest part about writing a word processor back then was font management. You had to construct width tables to be able to compose lines properly. This generally involved a bunch of poorly documented APIs and peering into opaque data structures. |
|