Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Simon Urbanek
Since I'm working with Paul on the glyph changes to the R graphics engine I'm quite interested in this so I had the idea to take out the guts from my Cairo package into a self-contained C code. Your request is good to bump is up on my stack. I already have code that draws text into OpenGL textur

Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Duncan Murdoch
I'm somewhat aware of how tricky it all is. For now I'm going to do it in R (usng textshaping for layout and base graphics on the ragg::agg_capture device to draw to the bitmap). I'll avoid allowing changes to happen in the C++ code. Eventually I'll see if I can translate the code into C++.

Re: [Rd] Help requested: writing text to a raster in memory

2023-09-24 Thread Simon Urbanek
Duncan, drawing text is one of the most complicated things you can do, so it really depends how for you want to go. You can do it badly with a simple cairo show_text API. The steps involved in doing it properly are detecting the direction of the language, finding fonts, finding glyphs (resolvin

[Rd] Help requested: writing text to a raster in memory

2023-09-23 Thread Duncan Murdoch
I am in the process of updating the rgl package. One thing I'd like to do is to change text support in it when using OpenGL to display to be more like the way text is drawn in WebGL displays (i.e. the ones rglwidget() produces). Currently in R, rgl uses the FTGL library to draw text. That li