The observation Less is More is an observation of Cello project that comes home time and time again. A considered path of least resistance seems generally to be the best course.
For the past week or so I have been working on the text effects and I had sort of stalled. Cello is an after hours project so it is hard to get a stretch of more than a few hours together. The text effects stalled because of the complexity of reworking the effects base class so that it would deal withe a CoreText view or the world (CTLine, CTRun, CFGlyph, CFString) rather than the inbuilt text. Ultimately if it takes a cold towel on your head to figure out what to do something somewhere is probably wrong.
Access to the old pre-CoreText text was made through an Accessor class that iterated through lines and style runs. My mistake was to not use or implement it. I went straight to CoreText for the text output - it seemed right I needed to add the distinction between glyphs and characters. The crunch was that the Accessor class is a component that is passed about for the text effects.
The better solution is instead to use and re-implement Accessor class so it sits on top of CoreText and change it so that it can handle glyphs. This is not hard to do and essentially preserves the way that text effects are written.
My approach here is to write the new Accessor class and go back to my text export (which works) and deploy it. I have good test files and an understanding of how it should work. I can also shape the Accessor class in place and round it in place if necessary. Then I will go back to the text effects base-class and plumb in something that may have a different thread but is of the same bore.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment