Hi Ryo,
The capability to change font characteristics within a label isn't implemented for PyFerret fonts.
You could probably do this kind of thing using separate labels, but it'd be a bit laborious,
set text/font=Times. . . .label 180,0,0,0,0.3,"upright"
set text/font=Times/italic
label 182,0,0,0,0.3," italic"
cancel text
set text/font=Times
label 184,0,0,0,0.3," upright"
where you'd need to fiddle with the locations to put one word after the other.
If using page "inches" to locate text instead of world coordinates, the LABWID function might be able to be used to put one piece of text after the previous one, but be aware that the function estimates the width of the label and so the location might be inaccurate for some fonts.
On 6/20/2021 7:34 PM, Ryo Furue wrote:
Dear Ferret users,
I'm trying to find ways to print part of a single piece of text in italics:
set text/font=Times. . . .label 180,0,0,0,0.3,"upright italic upright"
I thought "upright <i>italic</i> upright" would do that but found it doesn't. (<i> is the HTML tag for italicization.)
In the classical (Hershey) font set, you change fonts using the "@" font commands:
"@DRupright @CIitalic @DRupright"
How do we do this on PyFerret's new font system?
I'm using PyFerret v7.63 on macOS 11.4 .
Ryo
!--- a self-contained example ---set text/font=Times
use coads_climatology
fill/l=1 sst
label 180,0,0,0,0.3,"upright <i>italic</i> upright"