- to get a canvas to draw on a TfpgImage like on a window (this could be used to render text)
fpGUI's TfpgCanvas is not a TFPCustomCanvas descendant and doesn't surface the internal image buffer, so not all functionality is the same as FCL or LCL. Saying that, when I've needed that (probably twice in the last 10 years), I've used TAggPas to attach to a TfpgImage, do my painting using the AggPas API. Alternatively, I've also used FPImgCanv from FCL, then convert the fpImage to a TfpgImage.
With the fpGUI redesign I'm busy with, where AggPas will become the default reference rendering engine and switching to a single window handle per form (not widget), this should be a lot easier. But the 'develop' branch is not there yet.
- to get an image from any canvas (not essential however)
Same as the above answer - as a work-around you could Canvas.Pixels[], but probably not the fastest workaround.
- to draw data directly from data (opaque or transparent) : this can be achieved of course by creating an image
I've always used an image for this. You have direct access to the image data via the TfpgImage.ImageData and .ImageDataSize properties.
- to read an icon file (the type TIcon is in LCL)
Use FCL's FPImage and convert it to a TfpgImage - I saw no need to reinvent the wheel. See the fpg_imgfmt_png.pas unit for an example.
About UTF8 classes, it is ok as there as some functions in Free Pascal to do that.
Indeed, fpGUI has supported Unicode (UTF-8) for years without depending on LCL. ;-) The fpg_utils.pas unit shows how fpGUI accomplishes file access - mostly via the fpgToOSEncoding() and fpgFromOSEncoding() functions.