Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragaria instances sharing the same text storage also share the same text color #71

Closed
shysaur opened this issue Mar 21, 2015 · 5 comments
Labels

Comments

@shysaur
Copy link
Owner

shysaur commented Mar 21, 2015

Currently, the Fragaria which sets its text color last wins.

@shysaur
Copy link
Owner Author

shysaur commented Mar 22, 2015

This bug also exists for text font, but it does not cause issues. Instead, for color, this produces inconsistent results if one Fragaria is set to a different color theme than another.

@shysaur shysaur mentioned this issue Mar 22, 2015
@shysaur
Copy link
Owner Author

shysaur commented Mar 22, 2015

The only practical way to fix this is to subclass - showCGGlyphs:positions:count:font:matrix:attributes:inContext: in SMLLayoutManager to always use a certain text color attribute (ideally a new property of SMLLayoutManager) iff the block to draw is not syntax-coloured.

@shysaur
Copy link
Owner Author

shysaur commented Mar 22, 2015

The only practical way to fix this is to subclass - showCGGlyphs:positions:count:font:matrix:attributes:inContext: in SMLLayoutManager to always use a certain text color attribute (ideally a new property of SMLLayoutManager) iff the block to draw is not syntax-coloured.

This can't be done because custom attributes are not passed on to this method.

@shysaur
Copy link
Owner Author

shysaur commented Mar 22, 2015

We're hitting the text system's limits here.
Since no easy fix is possible, I'm just going to add a note in the documentation about this.

shysaur added a commit that referenced this issue Mar 22, 2015
@shysaur shysaur removed their assignment Mar 22, 2015
@shysaur shysaur closed this as completed Apr 17, 2015
@shysaur
Copy link
Owner Author

shysaur commented Apr 28, 2019

Actually fixed in 6b16cef thanks to MGSAttributeOverlayTextStorage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant