Skip to content

Partially implemented change in font code - pending bugs. #2115

Open
@MattHeffron

Description

@MattHeffron

Found from code examination:

There have been some changes to subfunctions of reading AC format DISPLAYFONT files, as well as in dealing with the "left kerning" information in FONTDESCRIPTOR and CHARSETINFO.

  • In file AFONT, in \READACFONTFILE when creating a CHARSETINFO instance it calls the MACRO \CREATEKERNELEMENT (in the file FONT) to initialize the LEFTKERN field. This macro was modified Dec 2024 to call the HELP function to indicate a problem. It appears that the only reason this hasn't occurred, is that AFONT has not been recompiled since that change.
  • Also, although \READACFONTFILE does set values into the LEFTKERN array, it doesn't return to \READDISPLAYFONTFILE any indication that there is any kerning information, so that the (FONTDESCRIPTOR FONTHASLEFTKERNS) flag can be set. \READDISPLAYFONTFILE isn't expecting any such information. The flag remains NIL.
  • In the file FONT, the MACRO \FSETLEFTKERN and FNS \FGETLEFTKERN are not consistent in assuming the form of the LEFTKERN field value. \FSETLEFTKERN assumes it is an ARRAY (as in \READACFONTFILE), while \FGETLEFTKERN assumes it is an a-list (1 or 2 level). And, at that, in \FGETLEFTKERN the arguments to one call of FASSOC are reversed.

Fortunately, in TEDIT-SCREEN (apparently the only place that attempts kerning) it checks the (FONTDESCRIPTOR FONTHASLEFTKERNS) flag, before attempting to use \FGETLEFTKERN, so it hasn't blown up.

It appears that much of this code is half-converted from pre-Koto release that only supported ASCII.
See: (MEDLEYDIR "docs>internal>fontchars.tedit")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working (as per documentation)

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions