Aggressively check maximum glyph dimensions

Because glyph dimensions are always forced to integers, using simple
ratios to calculate scaling factors doesn't always create glyphs that
are small enough to fit in the atlas.

Keep reducing the font size until all the glyphs fit in the atlas.

Change-Id: Iac2c75d0e58dfd993ea5e8e356eae762eaa111d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554078
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
1 file changed