Martin, Ecir, and Quincey:
Thank you all! All three answers turned out to be helpful. (Quincey, you led me
to learn about how to get attributed substrings, should I ever need to do it.)
Martin, your chief difference from my code seems be calling the layout
manager’s ensureGlyphsForCharacterRa
I’m using temporary attributes for TeXnicle (LaTeX editor), but as others have
said, it doesn’t work if you need bold etc.
Anyway, you can see the source at github:
https://github.com/martinhewitson/TeXnicle
You need to look in
TeXnicle/TeXnicle/TeXEditor/TextView/TeXColoringEngine.m
Origina
On Fri, Dec 19, 2014 at 6:58 PM, Quincey Morris <
quinceymor...@rivergatesoftware.com> wrote:
> On Dec 19, 2014, at 05:36 , Charles Jenkins wrote:
> >
> > Could it be that even though the layout manager's temporary attributes
> are designed for purposes like syntax highlighting, folks don't actua
On Dec 19, 2014, at 05:36 , Charles Jenkins wrote:
>
> Could it be that even though the layout manager's temporary attributes are
> designed for purposes like syntax highlighting, folks don't actually use them
> because they don't work right during edits?
I tried to use them once for underli
So I used DuckDuckGo to find "NSText syntax highlight," which led me to Uli
Kusterer's site where there an example syntax highlighting document project.
If I'm reading the code right, it appears Uli builds a new attributed string
with text colors and uses that to replace the original edited ra