Check for outlines instead of asserting (#138)

The outline fuzzer was relying on the use of FT_LOAD_NO_BITMAP in
"GlyphsOutlinesFuzzTarget()" [0] to produce only glyphs with
FT_GLYPH_FORMAT_OUTLINE to satisfy the assert in
"GlyphVisitorOutlines::run" [1].  This was never really true, but with
"[truetype] Ingnore FT_LOAD_NO_BITMAP in bitmap-only fonts." [2] this is
now very often false.  Because this assert could have been hit already,
remove the assert that the glyph has an outline and instead return early
if there is no outline.

[0] https://github.com/freetype/freetype2-testing/blob/57d875f1c45b5c9b83bf2e99cedc150108a2b28c/fuzzing/src/targets/glyphs/outlines.cpp#L47
[1] https://github.com/freetype/freetype2-testing/blob/57d875f1c45b5c9b83bf2e99cedc150108a2b28c/fuzzing/src/visitors/glyphvisitor-outlines.cpp#L46
[2] https://gitlab.freedesktop.org/freetype/freetype/-/commit/4ef8eed11b719409d9fc284fb80d886e5bd0b28f

Bug: https://issues.chromium.org/issues/385224946
1 file changed
tree: 87c9b01b41278d6ae3fcebe1238ff12c603f7830
  1. external/
  2. fuzzing/
  3. .gitignore
  4. .gitmodules
  5. .travis.yml
  6. LICENSE
  7. README.md
README.md

License: GPL v2 Build Status

FreeType

https://www.freetype.org/

FreeType is a freely available software library to render fonts.

Testing

This repository provides testing utilities for FreeType:

  • Fuzzing: house the fuzz targets for OSS-Fuzz and use Travis CI to run a regression test suite of fuzzed samples that uncovered verified and fixed bugs.