Forum How do I...?

Setting font size according to language

Initiator
Hi Mike,

I want to set the font size of Arabic text slightly higher than that of English or Bangla in PrinceXML.

In HTML, I could use <p lang="ar"> and then use the relevant CSS that applies only for "ar".

Is there any other way I could do it?

Thanks!
mikeday
That is the only way, some kind of CSS selector to match the paragraph or span. There is no way to match text within a paragraph or span, unless you use JavaScript regular expressions and add spans around the text you want to style, which is probably more trouble than it's worth.