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

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

Highlighted
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

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

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

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

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).

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

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';