[comp.lang.postscript] type 1 hint directions

arg@huxley.UUCP (Adam R. Grossman) (02/09/91)

leslie@book.dle.dg.com (Leslie French) asks:
   Does the direction of a hint make a difference, i.e. is there any
   difference between (say)

           150 -10 hstem    and    140 10 hstem

   if so, what? I've seen both 'positive' and 'negative' hints generated
   for a single character, and I'm curious as to whether or not there's a
   reason behind it.

First, you  must understand that Type  1  hinting is  declarative by nature
which means, as the Black Book ("Type 1 Font Format") points out, the "hint
system depends  on  an intelligent  rasterizing  algorithm to   render  the
character  outlines...  [and that   c]onsequently the   appearance  of font
characters  created  with  declarative hints will...     [change]   as hint
handling algorithms [change]." (p. 36)

Therefore, the answer to your question is "it depends on which interpretter
you are using" because different implementations will, by design, interpret
the hints differently.

However, two possible differences might be: (1) only part of the stem might
lie in  a BlueValue zone  and perhaps the zone  snapping  is activated only
when the stem starts/ends in the zone, or (2)  since the "from" end  may be
anchored before the "to"  end (e.g., "from 140 to  150" vs.  "from  150  to
140"), the "from" end is likely to have a more accurate placement while the
"to" end is likely to have a less accurate placement.
-- 
Adam Grossman
arg@bitstream.com

amanda@visix.com (Amanda Walker) (02/09/91)

In article <LESLIE.91Feb8175404@book.dle.dg.com> leslie@book.dle.dg.com
(Leslie French) writes:
>Does the direction of a hint make a difference, i.e. is there any
>difference between (say)
>        150 -10 hstem
>and
>        140 10 hstem
>if so, what?

I'm still a little fuzzy on some of the details of Adobe's hinting,
but my guess would be that the first argument tells the rasterizer
which edge to round in absolute device space (the other is then
adjusted relative to it, depending on the stem width).

Just a guess,
-- 
Amanda Walker						      amanda@visix.com
Visix Software Inc.					...!uunet!visix!amanda
--
"Furious activity is no substitute for understanding."	--H. H. Williams

leslie@book.dle.dg.com (Leslie French) (02/09/91)

Does the direction of a hint make a difference, i.e. is there any
difference between (say)
        150 -10 hstem
and
        140 10 hstem
if so, what?
I've seen both 'positive' and 'negative' hints generated for a single
character, and I'm curious as to whether or not there's a reason
behind it.

    Leslie.

=====================================================================
Dr L.J. French                                   tel: +(44) 223 67600
Data General
European Development Laboratory                  fax: +(44) 223 65020
Betjeman House
104 Hills Road                                   tlx:  818260 DGDLE G
Cambridge
England    CB2 1LQ                    email: leslie@bigben.dle.dg.com

orthlieb@adobe.COM (Carl Orthlieb) (02/14/91)

Talked to our font guru, Terry O'Donnell...

leslie@book.dle.dg.com (Leslie French) asked:

>   Does the direction of a hint make a difference, i.e. is there any
>   difference between (say)
>
>           150 -10 hstem    and    140 10 hstem

The simple answer is that it doesn't matter which way the stem
zone values are declared - either of these methods will give the
same result.

In the case of horizontal stems, for example - the order does
not determine which side of the stem is "anchored". The critical
case is where these hint zones lie in alignment zones declared in
the BlueValues array - such as those for the cap height, x-height, 
etc. In this case, alignment is controlled by a combination of where
the character extremity falls in the alignment zone - and the
values of other hint operators which control overshoots - namely
BlueScale and BlueShift.

Carl 8-)