Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237782

Only read advances up to the minimum of the numHorMetrics or the available font data.

XMLWordPrintable

        The hmtx table stores the linearly scaled advances of all glyphs.

        Per the opentype spec there can be fewer records in the table than there are glyphs in which case all entries past the last one apply to all remaining glyphs. The advance lookup code handles that.

        But what if there are records entries in the table than specified by the numHorMetrics field in the hhea table ?

        When we populate the advance widths we should stop reading when we reach the end of the table, else we could get a Java exception which would stop the font from being loaded when it might otherwise be OK - at least up to the extent of the valid data.

              prr Philip Race
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: