I’m looking to recreate an HTML-like text layout within BabylonJS. I need to mix regular and bold text within the same line, similar to HTML’s <span>Hello, <b>world</b></span>.
The TextBlock component doesn’t seem to support this kind of layout since individual blocks don’t acknowledge each other’s presence and overlap. Is there a way to achieve automatic text layouting that allows for mixed font weights?
If you mean the outline and outline color, yes, there is:
As for the rest (mixing font styles and faces) within a single textBlock… NOPE,… sadly. @carolhmj@PatrickRyan I’d like to take this opportunity in case you plan to v2 the TB control, to state again my +1 for this feature. In its simple version. In my opinion, the community project has gone beyond scope (and as said, never finished).
Sry, I didn’t look at the source (only the picture), lazy me
However, this example doesn’t look extruded to me. It can be easily reproduced with a GUI for mesh (plane) and in fact further modified towards the view from the camera using billboard mode.
With 2D GUI I’m having some resolution problem, this example solves this problem in a way. If you have existing PG that does the same effect I’d like to checkout!
Well, no, I don’t have one at hand. But any based on one of the doc PG could be created in minutes I suppose. What sort of resolution problem do you have? Do you mean the text is blurry, not crisp or is it something else?
It is not that blurry, but not as sharp as in the demo I sent. The difference is like JPG vs SVG; some have limitations, while the other is vector-based.
Are you in full-screen mode or texture mode. Did you try the solution for crisp texts in FS mode. Else, in texture mode, use a higher resolution? And then, I suppose it will never reach the quality of SVG.