View Single Post
Old 03-06-2018, 02:47 AM   #14
Guod3
Human being with feelings
 
Guod3's Avatar
 
Join Date: Jan 2008
Posts: 506
Default

Quote:
Originally Posted by Bobflip View Post
Have you looked into using Cairo fonts? I'm bundling a custom font in the resources of my plug and can use that across all my controls. It's possible to use more than one font as well with extra work. Here's a thread about it:

https://forum.cockos.com/showthread.php?t=197181

My code on the last post can be optimised, as it's creating the text path twice - once for the outline and once for the fill, where it only needs to create the path once and instead of the first cairo_stroke use cairo_stroke_preserve.
Having success using this recipe!!! I can use any font now. I simplified the text rendering to single layer. Otherwise I noticed the speed slowdown (my patch editor librarian view shows groups of 128 patches, thats a lot of text!)
Still don't know why my font choice was so limited with WDL-OL, but its great to be using Cairo graphics now, it is certainly very powerful for rich graphics.
Guod3 is offline   Reply With Quote