Sorry for the late reply, I’m interested to know more about your approach (I’ve only just come across your post while searching for a way to change the font size in code).
Full support is on Ehsan’s to do list: https://mcneel.myjetbrains.com/youtrack/issue/RH-81754
Rhino 8 Python Grasshopper Component.Code Property - #18 by eirannejad
The Compas-dev team produced some great tools. I’m not sure if they compile the scripts, and I’ve not had chance to test them. compas-actions.ghpython_components/componentize_cpy.py at main · compas-dev/compas-actions.ghpython_components · GitHub
The approach I used in Rhino 7 to create ghuser components, was to create a basic bare GH Python component, with no inputs and outputs whatsoever, but with its Name and NickName set (possibly the Description too for the tooltip).
I found it troublesome to add Params on a component from an external location, even when its disabled. Instead, each component knows its own name, so works out the required input and output args it needs from a common imported Python package or the plug-in.
It then adds its Input and Output Params itself, the first time RunScript runs. I’ve not tried it to build CPython components yet, but it built the old GH Python ones in Rhino 8 last year.
It’s by no means super efficient. But by starting from none whatsoever, it doesn’t care if any extra Params are added, so can supports the zoomable interface, and the user can add on whatever extra Params they like.