a better Text (about TextNodes and TextProperties)

latterly I was digging on TextNode,TextGraph and Textproperties and found’em a powerful mating but I’d found also some room for improvement for real-word applications. The first and urgent is for sure the actual behavior in nesting pushes where are involved glyphscales, that make no sense at all to me 'cos the whole text is always applied to one same Textnode, so making each size relative to the nesting parent could easily ends in a text really different to what we expected. And also I saw the C++ shift is really easy.
Another improvement, that should really make the difference but I can’t say if is easy to do, is to extend the TextGraph embedding to any kind of node object not just simpe card models but, in example, a directgui object or a node with custom content, caring just about the dimensions of the framed area where will be wrapped the object inside the text.
Thinking that with just those two features it will be possible to wrap a simple web page renderer in panda3D, I guess this is something to talk about.

The glyph scale was really intended to work with glyph shift to implement subscripts and superscripts (in which case nested scales are appropriate); it was not intended as a general-purpose font sizer.

That’s not to say that it wouldn’t be useful to have a general-purpose font scaler. It would be easy to add. Would you like to consider doing that work?

As to the TextGraphic object, it does already support arbitrary nodes, including DirectGui objects.

As cool as it sounds, I’m not yet 100% convinced that a web page renderer within a 3-D engine is all that useful. Displaying a screen full of text isn’t what 3-D engines, or 3-D graphics cards, are good at. It’s true it can be done, though.

David

man, you read my mind! :wink:
I was already thinking to duplicate and customize (and also fix cos I’d found other issues meanwhile) TextProperties and related stuff for myself and use as an add-on - should I proceed like that or do you know a better way? If you could address me would be really helpful cos this is my first touching the P3D engine core

well but I tried before and do not worked out 100% - soon I’ll post a plain code to show you, maybe I did wrong

hehe I would have bet this - I saw around this forum you guys are looking far beyond this stuff such as raytracing and so on. :slight_smile:
But I think that it will ease to build nice text intefaces and will open a little P3d to the web - think especially about RPG games or MMOs for client-server communications while the gamer interacts also with forms etc. how easy would be just to automatically parse a plain html.