# Custom Text Function

**URL:** <https://discourse.processing.org/t/custom-text-function/11444>\
**Category:** Gallery\
**Created:** [May 21, 2019, 1:15am UTC](https://discourse.processing.org/t/custom-text-function/11444 "2019-05-21T01:15:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrPyro](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrPyro](https://discourse.processing.org/u/MrPyro)\
**Post date:** [May 21, 2019, 1:15am UTC](https://discourse.processing.org/t/custom-text-function/11444/1 "2019-05-21T01:15:23Z")

</div>

Created a custom text function that fills text depending on the colour behind it. Currently works best when drawing on top of either white or black (other colours work but not as well).

![tlib](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3668cca03d121c041437c6cf0a8d0fbb1577825e.png)  
(source) [https://github.com/Mr-Pyro/VisibleTextLib/tree/master/src/Pyro/TextLib/Text](https://github.com/Mr-Pyro/VisibleTextLib/tree/master/src/Pyro/TextLib/Text)  
(jar file) [https://github.com/Mr-Pyro/VisibleTextLib/blob/master/Text.jar](https://github.com/Mr-Pyro/VisibleTextLib/blob/master/Text.jar)  
(example) [https://github.com/Mr-Pyro/VisibleTextLib/blob/master/src/Pyro/TextLib/Main.java](https://github.com/Mr-Pyro/VisibleTextLib/blob/master/src/Pyro/TextLib/Main.java)

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [May 21, 2019, 1:30am UTC](https://discourse.processing.org/t/custom-text-function/11444/2 "2019-05-21T01:30:30Z")

</div>

Nice idea for a library, congrats! 👌  
However, b/c your library uses a lambda `->` structure:

> <https://github.com/Mr-Pyro/VisibleTextLib/blob/master/src/Pyro/TextLib/Text/VisibleText.java#L53-L54>

We can’t currently use “VisibleText.java” file under the PDE. Only the already compiled “Text.jar”. 😢  
Also maybe you should consider removing `static` from **text()**. 🙄  
It’s slightly tiresome to pass `this` all the time as its 1st parameter. 🥱
