Visual Truetype 6.35 and diagonal hints

When trying to apply diagonal hints to a regular (non italic) sans serif style font (i.e. Arial, Gill Sans, Univers) glyph (upper case V) using the Stroke function within the main window I receive the following error (with grid-fit on):

"Glyph ID 36
Critical Error: Int: CALL Function not defined.  Function = 20 At ByteOffset: 42"

Glyph ID 36 is upper case V in my instance and function 20 in the Glyph Program window is :
"CALL [], 2, 76, 5, 4, 20"

The 2, 5, and 4 are point numbers within the glyph which are receiving the diagonal hint and the 76 is my CVT Diagonal StraightStroke number.  If the '20' is also a reference to the CVT then that would point to UpperCase X ItalicRun in which I filled in as 290.  The Pre-Program has no function 20 calls nor does the Font Program.

If I manually input the Stroke command in the VTT talk window I receive the same error.

If I manually input the DStroke command in the VTT talk window I receive the same type of error but with slightly different parameters:

"Glyph ID 36
Critical Error: Int: CALL Function not defined.  Function = 66 At ByteOffset: 35"

Once again, if function '66' is a CVT reference then there is a value stored there.  Likewise, there is a CALL 66 listed in the Pre-Program too.

Admittingly, this is my maiden voyage with hinting and the use of Visual Truetype so perhaps I'm missing something or forgot to fill in a value somewhere...
System specs:
Windows 10 (22H2) (64-bit)
Visual Truetype Version 6.35 (64-bit)

Comments

  • John Hudson
    John Hudson Posts: 3,149
    I’ll ping some people who may be able to address this.
  • Mike Duggan
    Mike Duggan Posts: 239
    Hi Tazin, I don’t have an answer as yet. Just curious, what are you trying to achieve with the diagonal hints? Are you hunting for monochrome display (I.e, Black and white) where you need a particular pixel pattern? Diagonal hints are not needed for any modern rendering 
  • TAZIN
    TAZIN Posts: 10
    Hi Tazin, I don’t have an answer as yet. Just curious, what are you trying to achieve with the diagonal hints? Are you hunting for monochrome display (I.e, Black and white) where you need a particular pixel pattern? Diagonal hints are not needed for any modern rendering 
    I'll be using the font on older systems (Windows 98 & Windows NT 3.10) in addition to my newer systems so I'm trying to make it render as nice as possible for the older systems.
  • TAZIN
    TAZIN Posts: 10
    I’ll ping some people who may be able to address this.
    Much appreciated.  Thank you.
  • Mike Duggan
    Mike Duggan Posts: 239
    Ok thanks ! John pinged someone at MS, so hopefully they will read and reply. 
  • TAZIN
    TAZIN Posts: 10
    edited April 2023
    While I'm on the subject of diagonal control instructions, do the control flags for instructions Diagonal, Stroke, and DStroke operate as following:
    <<: use the first two points listed as stationary.
    >>: use the last two points listed as stationary.
    ><: use the middle two points listed as stationary.
    <>: use the first and last points listed as stationary.
  • Mike Duggan
    Mike Duggan Posts: 239
    its a long time since I used those commands. You might find this article by Vinnie, useful, written at the time diagonal commands were relevant to hinting. https://learn.microsoft.com/en-us/typography/truetype/italic-hinting-examples

  • TAZIN
    TAZIN Posts: 10
    its a long time since I used those commands. You might find this article by Vinnie, useful, written at the time diagonal commands were relevant to hinting. https://learn.microsoft.com/en-us/typography/truetype/italic-hinting-examples

    Thank you for the link.  I'll check it out.
  • How did you begin your project? Generally, the high-level commands assume certain functions are present in the font program. You typically start a project by either auto hinting or import templates to establish the font program with needed functions. 
  • TAZIN
    TAZIN Posts: 10
    How did you begin your project? Generally, the high-level commands assume certain functions are present in the font program. You typically start a project by either auto hinting or import templates to establish the font program with needed functions. 
    I actually started the project both ways, Auto-hint and manually.  Auto-hint gave me the background need to understand how the variables were measured/calculated for the control table in addition to illustrating the basics of hinting proceedures.
    The manual version allowed me to fine tune the glyph measurements, and averages, so I could better control hinting values where needed.  Both versions were created with the Prepare Font function.
  • If you are autohinting you don't need Prepare Font, as autohinting will setup the font as part of it's process. 
  • TAZIN
    TAZIN Posts: 10
    If you are autohinting you don't need Prepare Font, as autohinting will setup the font as part of it's process. 
    True, since Auto-hint activates Prepare Font automatically.
  • TAZIN
    TAZIN Posts: 10
    its a long time since I used those commands. You might find this article by Vinnie, useful, written at the time diagonal commands were relevant to hinting. https://learn.microsoft.com/en-us/typography/truetype/italic-hinting-examples

    Just for shits-n-giggles, I duplicated the VTT talk instructions for the upper case 'H' found in the link you provided on an italic version of my font and the results are the same.
    "Glyph ID 43
    Critical Error: Inst: CALL Function not defined. Function = 20 
    At ByteOffset: 99"

    The Glyph Program has these calls listed as the problem:
    CALL[], 5, 103, 6, 7, 20
    CALL[], 11, 103, 0, 1, 20

    Which of course relates to these two VTT talk entries:
    Diagonal>>(6,5,7,8,103)
    Diagonal>>(0,11,1,2,103)

    As with my other example (upper case V) there is no function 20 found in either the Pre-Program or the Font Program.  In this instance the Control Table has CVT #20 as 0 /* DO NOT USE !!! */ since the Control Table for this font was generated using the Control Table Only function under  AutoHint.

    Additionally, the Display mode environment (i.e. ClearType, Gray scale, etc.,) doesn't have any effect regarding the error nor does compiling under Legacy Mode.
  • TAZIN
    TAZIN Posts: 10
    edited May 2023
    Update:
    Had some time over this past weekend to look into the reason why VTT 6.35 will not do Diagonal hints (or Strokes) and it turns out the Font Program Table template generated during Prepare Font is missing around 60 functions when compared to earlier VTT versions (4.0 era).  After adding these missing functions VTT 6.35 handles Diagonal hints fine now.