[Thread Prev][Thread Next][Index]

Re: [ferret_users] pyferret fonts: italicize only a part of text?



Being very happy with the regular Ferret fonts, I haven't bothered to learn the new PyFerret ones. The old ones still work fine in PyFerret, including font changes within labels, subscripts, superscripts, etc.

So why not use the old-style fonts for situations when this will be an issue?

Billy

On Mon, Jun 21, 2021 at 5:31 PM Ansley Manke <a.c.manke@xxxxxxxxx> wrote:

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"



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@xxxxxxxx
Tel: 206-526-6221
Fax: 206-526-6744

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement