Skip to content

Conversation

KonstantinRitt
Copy link
Contributor

This is what Unicode suggests to do.
In contrast to raising an error (which only useful when there is
someone to catch that error), this allows to skip the codepoint
validity checks in the hb_unicode callbacks.

This is what Unicode suggests to do.
In contrast to raising an error (which only useful when there is
someone to catch that error), this allows to skip the codepoint
validity checks in the hb_unicode callbacks.
behdad added a commit that referenced this pull request Jul 11, 2014
Only if the font doesn't support it.  Ie, this gives the user to
use non-Unicode codepoints as private values and return a meaningful
glyph for them.  But if it's invalid and font callback doesn't
like it, and if font has U+FFFD, show that instead.

Font functions that do not want this automatic replacement to
happen should return true from get_glyph() if unicode > 0x10FFFF.

Replaces #27
@behdad
Copy link
Member

behdad commented Jul 11, 2014

I fixed it this way instead:
efe7421

It's important to NOT lose the error. Here's how Pango prevents the automatic replacement and draw its own invalid-byte shape:
https://git.gnome.org/browse/pango/commit/?id=9f67b924eb662f498f4e643ed740ce84640968f7

@behdad behdad closed this Jul 11, 2014
@KonstantinRitt KonstantinRitt deleted the fffd branch January 27, 2015 08:25
gpgreen pushed a commit to gpgreen/harfbuzz that referenced this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants