-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
font: have Glyph return !ok for U+FFFD substitute
The other return values may still be non-zero, but this lets callers identify when substitution happens. "TODO: is falling back on the U+FFFD glyph the responsibility of the Drawer or the Face?" was resolved. The answer is "the Face". For kerning, the previous rune is unchanged (and not set to U+FFFD). This also fixes an inconsistency in the basicfont.Face implementation, where GlyphAdvance and GlyphBounds would unconditionally return a non-zero advance, but Glyph could return a zero advance when the Face doesn't have a U+FFFD entry. Fixes golang/go#58252 Change-Id: Ie97e68e1d5e2efd13c9e84ad12db4495d83a5ca3 Reviewed-on: https://go-review.googlesource.com/c/image/+/474376 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Nigel Tao (INACTIVE; USE @golang.org INSTEAD) <nigeltao@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org>
- Loading branch information
Showing
3 changed files
with
75 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters