Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Two fonts one node

0 votes

I want to have two types of text fonts in one node; one row plain and the next row in cursive.
Is this possible? So far I can only find out how to have one of them.
in Help by (120 points)

1 Answer

0 votes

Yes, this is possible. Either use two distinct labels (additional labels may be added from the node context menu) or use HTML formatting in your label text (see How can I achieve different text stylings within one label? for additional information).

by [yWorks] (160k points)
When I try to add a new label below the original one in a different font, it places the label right on top. How to move it down?
By selecting it and dragging it to the desired position with the mouse.
If a label is inside a node, clicking on it will probably select the node but not the label. In this case, press and hold CTRL while clicking. This will "cycle" the selection through all elements below the mouse.
Thanks so much! This helped me move the 2nd label away.  However, the initial label stays centered no matter what.  When I try properties, it only gives me the option of center, left, right, but not to move it up.  Maybe I need to fiddle with the fit node to label function?
No, "Fit Node to Label" will not help with that. The available positions of labels are determined by the label's "Placement" property (select the label and see the properties view in yEd's lower right corner or type F6 to open the properties dialog). When editing the "Placement" property a small dialog is shown with options "Model" and "Position". Some models (like e.g. "Internal") will allow for specific positions only while others (like e.g. "Smart Free") will allow for arbitrary positions (i.e. the "Position" drop-down list has an entry "Anywhere"). If you want to place the label manually using the mouse, I recommend "Placement" model "Smart Free".
Since you are mentioning values "Center", "Left", and "Right", you are probably trying to adjust the label's "Alignment" property instead of its "Placement" property. "Alignment" governs the text alignment inside the label bounds (and thus has a visible effect only for multiple lines of text in one label) whereas "Placement" determines the label placement in relation to the labeled element (i.e. node or edge).
Legal Disclosure | Privacy Policy