cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to modify the font size of the element using an attribute.

rboneti
1-Newbie

How to modify the font size of the element using an attribute.

Hi everybody!

Anyone knows how to modify the font size of the element using any its attribute?

Example:

In my DTD, I've this element:

<!ELEMENT para EMPTY>

<!ATTLIST para

font-size NUMBER #IMPLIED

>

How to use this attribute 'font-size' to set the font size?

This appear a easy case, but I haven't seen this function in Arbortext.

3 REPLIES 3
rdiaz
5-Regular Member
(To:rboneti)

Hey again Robson,

This would be resolved similar to the example I provided for the field with only an X in it.

The functionality isn't in Editor itself, but in the Styler component.

You would create a new context, with an attribute check on the font-size field.

Of course, each context can only assign one specific font size, so you would need to have a context for each font size you expect users to input. So it might look similar to (replacing 'os' with 'font-size'):

fontsize.png

rboneti
1-Newbie
(To:rdiaz)

Rafael,

Actually, I need that when I type the attribute on the xml, the font adjusts automatically, like works with the graphics (when I change the attribute of the height, it adjusts the height automatically).

Thanks for all!

I solved this case using the APP.

For this, I saw the interface style and changed the font's height. Like this:

style.height = arguments[0].attributes.font-size+'pt';

Top Tags