Repository navigation
Added Halo for FontRun - #44
Conversation
Added handling of Halo in FontRun Added examples to SandboxDriver
|
This is exactly what I was looking for however I applied your changes but saw no halo applied. My text is created using a RichString. I see no reference to FontRun in the RichString file so suspect further digging is required.... or I've screwed up. An example of the style I tested.. An example of the RichString Hope that helps. |
|
You are right. Because I don't use RichString, I didn't see this problem. I added now the code to handle halo in RichString too. Perhaps you can test it? |
|
@m1dst Be careful. The halo isn't added to the measurements. If we want to do it correct, then width and height should be increased by |
|
@charlenni Makes sense. In my use case I am using it to watermark images. Plenty of padding around it, all looks good. |
What exactly are the issues here? Is it just that the returned measured sizes don't include the halo size? |
|
Yes. The halo isn't used to calculate the sizes. I'm still not sure, if this is a good or bad idea. The problem is, that the measured sizes aren't correct. I didn't look through RichTextKit to find the places, where this happens. If you say, we need it, then I could try to find them. |

Added Halo to IStyle and Style
Added handling of Halo in FontRun
Added examples to SandboxDriver
This isn't far from perfect. The sizes aren't corrected for the halo. But I assume, that this isn't very important ;-)
Further, I don't know if there are other parts in RichTextKit, that draw anything to canvas.
The result looks like this: